Description of problem:
When running guestfish under nested virtualization in a VMware hypervisor, the call to qemu fails. I ran into this while trying to build Fedora CoreOS and filed a bug here: https://github.com/coreos/coreos-assembler/issues/198
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a VM under a VMware hypervisor with nested virtualization turned on
2. Create a qemu disk image
3. Use guestfish to modify the image
with LIBGUESTFS_DEBUG=1, it produces the following error:
qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /builddir/build/BUILD/qemu-2.11.2/target/i386/kvm.c:1807: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
The operation would complete as expected.
I worked around the bug in https://github.com/coreos/coreos-assembler/pull/199 by changing the `cpu` flag from `-cpu host` to `-cpu host,pmu=off`. In the discussion, we decided at least for our use-case, an unconditional application of this setting should meet our needs. I'm not sure if there's places where guestfish would need `pmu=on`, so maybe this could just be the default setting for all applications.
Yup fairly much a known bug in either VMware or QEMU:
To work around it do:
Old bug in QEMU, should be solved with newer versions of it.