Bug 1648403 - Running guestfish under a vmware hypervisor fails with default configuration
Summary: Running guestfish under a vmware hypervisor fails with default configuration
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-09 15:53 UTC by Derek Ditch
Modified: 2019-09-25 13:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-25 13:38:54 UTC


Attachments (Terms of Use)

Description Derek Ditch 2018-11-09 15:53:04 UTC
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):
guestfish 1.38.6fedora=28,release=1.fc28,libvirt

How reproducible:
100%

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

Actual results:
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.


Expected results:
The operation would complete as expected.

Additional info:
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.

Comment 1 Richard W.M. Jones 2018-11-09 15:58:54 UTC
Yup fairly much a known bug in either VMware or QEMU:
https://bugs.launchpad.net/qemu/+bug/1661386

To work around it do:

 export LIBGUESTFS_BACKEND_SETTINGS=force_tcg

(http://libguestfs.org/guestfs.3.html#force_tcg)

Comment 2 Pino Toscano 2019-09-25 13:38:54 UTC
Old bug in QEMU, should be solved with newer versions of it.


Note You need to log in before you can comment on or make changes to this bug.