Bug 886915 - libguestfs with libvirt attach-method fails with odd error if default hypervisor is Xen
Summary: libguestfs with libvirt attach-method fails with odd error if default hypervi...
Keywords:
Status: CLOSED UPSTREAM
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: 2012-12-13 15:15 UTC by Richard W.M. Jones
Modified: 2012-12-16 20:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-16 20:58:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-12-13 15:15:34 UTC
Description of problem:

  unsupported flag 0x2 in function xendaemoncreatexml

The problem is that the user's default hypervisor is Xen.  libguestfs
tries to open a default libvirt connection and then create a qemu
domain, but this fails.

libguestfs should parse the libvirt capabilities to check that
qemu or kvm is actually supported, and bail with a better error
message if not.

Version-Release number of selected component (if applicable):

libguestfs 1.19.66

Comment 1 Richard W.M. Jones 2012-12-16 20:58:35 UTC
I fixed libguestfs so it now parses the capabilities XML
returned by libvirt and finds the valid domain types.  If
none of the domain types are "qemu" or "kvm" then it fails
early with a useful error message:

$ export LIBGUESTFS_ATTACH_METHOD=libvirt:test:///default
$ libguestfs-test-tool
libguestfs: error: libvirt hypervisor doesn't support qemu or KVM,
so we cannot create the libguestfs appliance.
The current attach-method is:
  libvirt:test:///default
Try setting:
  export LIBGUESTFS_ATTACH_METHOD=libvirt:qemu:///session
or if you want to have libguestfs run qemu directly, try:
  export LIBGUESTFS_ATTACH_METHOD=appliance
or read the guestfs(3) man page

Fixed in
https://github.com/libguestfs/libguestfs/commit/11b6293d1bf7a6c0133c609e0e8067b4422dc794


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