Bug 1925029
Summary: | RHEL 8.2 - libguestfs error: libvirt hypervisor doesn’t support qemu or KVM | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | xujin | ||||||
Component: | libguestfs | Assignee: | Virtualization Maintenance <virt-maint> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | YongkuiGuo <yoguo> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 8.2 | CC: | rjones, virt-maint, yoguo | ||||||
Target Milestone: | rc | ||||||||
Target Release: | 8.0 | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2021-02-08 09:39:59 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Could you please run: libguestfs-test-tool and attach the complete output to the bug. Hi Richard, Thanks for your reply. If I recalled correctly, I will get the similar output as the libguestfs error. Sorry, I'm currently using the machine and the libvirt tool. So, I can't reproduce the environment at the moment. Can you please find a machine and reproduce it? Thank you. Best Regards Edward Created attachment 1755008 [details]
Here is the dnf.rpm.log.
I really need the log. We routinely test virt-customize and don't see this. If you're unable to reproduce the bug then there's nothing I can do. Hi Edward, I cannot reproduce this issue. Version-Release number of selected component: libguestfs-1.40.2-25.module+el8.3.0+7421+642fe24f.x86_64 qemu-kvm-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 Steps: 1. On rhel8.3 host # virt-customize --root-password password:redhat --uninstall cloud-init --selinux-relabel --hostname mytest --ssh-inject root:file:/root/.ssh/id_rsa.pub -a rhel-guest-image-8.3-401.x86_64.qcow2 [ 0.0] Examining the guest ... [ 8.8] Setting a random seed [ 8.9] Setting the machine ID in /etc/machine-id [ 8.9] Uninstalling packages: cloud-init [ 15.2] Setting the hostname: mytest [ 15.3] SSH key inject: root [ 18.2] Setting passwords [ 20.5] SELinux relabelling [ 39.6] Finishing off Hi Yongkui and Richard, I've managed to reproduce the issue on my test machine, here is the output: [root@dell-r640-11 ssd_vms]# virt-customize --root-password password:redhat \ > --uninstall cloud-init \ > --selinux-relabel \ > --hostname mytest \ > --ssh-inject root:file:/root/.ssh/id_rsa.pub \ > -a mytest.qcow2 [ 0.0] Examining the guest ... virt-customize: error: libguestfs error: libvirt hypervisor doesn’t support qemu or KVM, so we cannot create the libguestfs appliance. The current backend is ‘libvirt’. Check that the PATH environment variable is set and contains the path to the qemu (‘qemu-system-*’) or KVM (‘qemu-kvm’, ‘kvm’ etc). Or: try setting: export LIBGUESTFS_BACKEND=libvirt:qemu:///session Or: if you want to have libguestfs run qemu directly, try: export LIBGUESTFS_BACKEND=direct For further help, read the guestfs(3) man page and libguestfs FAQ. If reporting bugs, run virt-customize with debugging enabled and include the complete output: virt-customize -v -x [...] [root@dell-r640-11 ssd_vms]# [root@dell-r640-11 ssd_vms]# [root@dell-r640-11 ssd_vms]# libguestfs-test-tool ************************************************************ * IMPORTANT NOTICE * * When reporting bugs, include the COMPLETE, UNEDITED * output below in your bug report. * ************************************************************ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin XDG_RUNTIME_DIR=/run/user/0 SELinux: Permissive guestfs_get_append: (null) guestfs_get_autosync: 1 guestfs_get_backend: libvirt guestfs_get_backend_settings: [] guestfs_get_cachedir: /var/tmp guestfs_get_hv: /usr/libexec/qemu-kvm guestfs_get_memsize: 768 guestfs_get_network: 0 guestfs_get_path: /usr/lib64/guestfs guestfs_get_pgroup: 0 guestfs_get_program: libguestfs-test-tool guestfs_get_recovery_proc: 1 guestfs_get_smp: 1 guestfs_get_sockdir: /tmp guestfs_get_tmpdir: /tmp guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 600 seconds. libguestfs: launch: program=libguestfs-test-tool libguestfs: launch: version=1.40.2rhel=8,release=25.module+el8.3.0+7421+642fe24f,libvirt libguestfs: launch: backend registered: unix libguestfs: launch: backend registered: uml libguestfs: launch: backend registered: libvirt libguestfs: launch: backend registered: direct libguestfs: launch: backend=libvirt libguestfs: launch: tmpdir=/tmp/libguestfsJ1Ejso libguestfs: launch: umask=0022 libguestfs: launch: euid=0 libguestfs: libvirt version = 6000000 (6.0.0) libguestfs: guest random name = guestfs-tjglo379mok88oc6 libguestfs: connect to libvirt libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0 libguestfs: successfully opened libvirt handle: conn = 0x5559418be7d0 libguestfs: unable to read qemu version from libvirt: internal error: Cannot find suitable emulator for x86_64 [code=1 int1=-1] libguestfs: get libvirt capabilities libguestfs: parsing capabilities XML libguestfs: error: libvirt hypervisor doesn’t support qemu or KVM, so we cannot create the libguestfs appliance. The current backend is ‘libvirt’. Check that the PATH environment variable is set and contains the path to the qemu (‘qemu-system-*’) or KVM (‘qemu-kvm’, ‘kvm’ etc). Or: try setting: export LIBGUESTFS_BACKEND=libvirt:qemu:///session Or: if you want to have libguestfs run qemu directly, try: export LIBGUESTFS_BACKEND=direct For further help, read the guestfs(3) man page and libguestfs FAQ. libguestfs: closing guestfs handle 0x5559418bc930 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsJ1Ejso [root@dell-r640-11 ssd_vms]# To reproduce the issue, I've upgraded the version of qemu-kvm: [root@dell-r640-11 HANA2SPS04]# yum update qemu-kvm-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 Updating Subscription Management repositories. /usr/lib/python3.6/site-packages/dateutil/parser/_parser.py:70: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 instream = instream.decode() This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions. Last metadata expiration check: 1:51:49 ago on Fri 05 Feb 2021 11:12:40 PM UTC. Dependencies resolved. ============================================================================================================================================================================= Package Architecture Version Repository Size ============================================================================================================================================================================= Upgrading: qemu-img x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 1.0 M qemu-kvm x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 107 k qemu-kvm-block-curl x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 118 k qemu-kvm-block-gluster x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 119 k qemu-kvm-block-iscsi x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 125 k qemu-kvm-block-rbd x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 119 k qemu-kvm-block-ssh x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 120 k qemu-kvm-common x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 1.2 M qemu-kvm-core x86_64 15:4.2.0-34.module+el8.3.0+7976+077be4ec rhel-8-for-x86_64-appstream-rpms 3.4 M Transaction Summary ============================================================================================================================================================================= Upgrade 9 Packages Total download size: 6.3 M Is this ok [y/N]: y Downloading Packages: (1/9): qemu-kvm-block-iscsi-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 150 kB/s | 125 kB 00:00 (2/9): qemu-kvm-common-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 1.3 MB/s | 1.2 MB 00:00 (3/9): qemu-kvm-core-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 3.3 MB/s | 3.4 MB 00:01 (4/9): qemu-kvm-block-rbd-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 319 kB/s | 119 kB 00:00 (5/9): qemu-kvm-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 207 kB/s | 107 kB 00:00 (6/9): qemu-kvm-block-curl-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 310 kB/s | 118 kB 00:00 (7/9): qemu-img-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 1.3 MB/s | 1.0 MB 00:00 (8/9): qemu-kvm-block-ssh-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 140 kB/s | 120 kB 00:00 (9/9): qemu-kvm-block-gluster-4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64.rpm 136 kB/s | 119 kB 00:00 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.6 MB/s | 6.3 MB 00:02 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: qemu-kvm-common-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 1/1 Upgrading : qemu-kvm-common-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 1/18 Running scriptlet: qemu-kvm-common-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 1/18 Upgrading : qemu-kvm-block-iscsi-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 2/18 Upgrading : qemu-kvm-block-rbd-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 3/18 Upgrading : qemu-kvm-block-curl-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 4/18 Upgrading : qemu-kvm-block-ssh-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 5/18 Upgrading : qemu-kvm-block-gluster-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 6/18 Upgrading : qemu-img-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 7/18 Upgrading : qemu-kvm-core-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 8/18 Running scriptlet: qemu-kvm-core-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 8/18 Upgrading : qemu-kvm-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 9/18 Cleanup : qemu-kvm-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 10/18 Cleanup : qemu-kvm-core-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 11/18 Cleanup : qemu-kvm-block-curl-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 12/18 Cleanup : qemu-kvm-block-gluster-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 13/18 Cleanup : qemu-kvm-block-iscsi-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 14/18 Cleanup : qemu-kvm-block-rbd-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 15/18 Cleanup : qemu-kvm-block-ssh-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 16/18 Running scriptlet: qemu-kvm-common-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 17/18 Cleanup : qemu-kvm-common-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 17/18 Running scriptlet: qemu-kvm-common-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 17/18 Cleanup : qemu-img-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 18/18 Running scriptlet: qemu-img-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 18/18 Verifying : qemu-kvm-common-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 1/18 Verifying : qemu-kvm-common-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 2/18 Verifying : qemu-kvm-core-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 3/18 Verifying : qemu-kvm-core-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 4/18 Verifying : qemu-kvm-block-iscsi-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 5/18 Verifying : qemu-kvm-block-iscsi-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 6/18 Verifying : qemu-kvm-block-rbd-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 7/18 Verifying : qemu-kvm-block-rbd-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 8/18 Verifying : qemu-kvm-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 9/18 Verifying : qemu-kvm-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 10/18 Verifying : qemu-img-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 11/18 Verifying : qemu-img-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 12/18 Verifying : qemu-kvm-block-curl-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 13/18 Verifying : qemu-kvm-block-curl-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 14/18 Verifying : qemu-kvm-block-ssh-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 15/18 Verifying : qemu-kvm-block-ssh-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 16/18 Verifying : qemu-kvm-block-gluster-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 17/18 Verifying : qemu-kvm-block-gluster-15:2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64 18/18 Installed products updated. Upgraded: qemu-img-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-block-curl-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-block-gluster-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-block-iscsi-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-block-rbd-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-block-ssh-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-common-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 qemu-kvm-core-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 Complete! Do you have package libvirt-daemon-kvm installed? I can reproduce this issue. Steps: 1. Install libguestfs packages on rhel8.2 host 2. Enable rhel8.3 repo in rhel8.2 host 3. Update libguestfs and qemu-kvm packages 4. Run libgeustfs-test-tool and the error is shown as above 5. Check the libvirtd service status internal error: Failed to start QEMU binary /usr/libexec/qemu-kvm for probing: qemu-kvm: cannot initialize crypto: Unable to initialize gcrypt In fact, The Bug 1828681 (Unable to initialize gcrypt will prevent qemu related commands from running) is the root cause of this issue. Solution: # yum update libgcrypt Hi Yongkai, The issue has been solved after updating libgcrypt package. Feel free to archive this bug. Thank you. [root@dell-r640-11 ssd_vms]# yum update libgcrypt Updating Subscription Management repositories. /usr/lib/python3.6/site-packages/dateutil/parser/_parser.py:70: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 instream = instream.decode() This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions. Last metadata expiration check: 0:05:07 ago on Mon 08 Feb 2021 02:40:39 AM UTC. Dependencies resolved. ============================================================================================================================================================================= Package Architecture Version Repository Size ============================================================================================================================================================================= Upgrading: libgcrypt x86_64 1.8.5-4.el8 rhel-8-for-x86_64-baseos-rpms 463 k Transaction Summary ============================================================================================================================================================================= Upgrade 1 Package Total download size: 463 k Is this ok [y/N]: y Downloading Packages: libgcrypt-1.8.5-4.el8.x86_64.rpm 879 kB/s | 463 kB 00:00 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 875 kB/s | 463 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Upgrading : libgcrypt-1.8.5-4.el8.x86_64 1/2 Running scriptlet: libgcrypt-1.8.5-4.el8.x86_64 1/2 Cleanup : libgcrypt-1.8.3-4.el8.x86_64 2/2 Running scriptlet: libgcrypt-1.8.3-4.el8.x86_64 2/2 Verifying : libgcrypt-1.8.5-4.el8.x86_64 1/2 Verifying : libgcrypt-1.8.3-4.el8.x86_64 2/2 Installed products updated. Upgraded: libgcrypt-1.8.5-4.el8.x86_64 Complete! [root@dell-r640-11 ssd_vms]# libguestfs-test-tool ************************************************************ * IMPORTANT NOTICE * * When reporting bugs, include the COMPLETE, UNEDITED * output below in your bug report. * ************************************************************ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin XDG_RUNTIME_DIR=/run/user/0 SELinux: Permissive guestfs_get_append: (null) ... guestfsd: => internal_autosync (0x11a) took 0.03 secs libguestfs: calling virDomainDestroy flags=VIR_DOMAIN_DESTROY_GRACEFUL libguestfs: closing guestfs handle 0x561c5230c930 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsOS7RVb libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsboypza ===== TEST FINISHED OK ===== [root@dell-r640-11 ssd_vms]# [root@dell-r640-11 ssd_vms]# [root@dell-r640-11 ssd_vms]# virt-customize --root-password password:redhat \ > --uninstall cloud-init \ > --selinux-relabel \ > --hostname mytest \ > --ssh-inject root:file:/root/.ssh/id_rsa.pub \ > -a mytest.qcow2 [ 0.0] Examining the guest ... [ 5.4] Setting a random seed [ 5.5] Uninstalling packages: cloud-init [ 9.1] Setting the hostname: mytest [ 9.2] SSH key inject: root [ 10.8] Setting passwords [ 11.9] SELinux relabelling [ 20.8] Finishing off [root@dell-r640-11 ssd_vms]# Best Regards Edward Yes I agree also with yoguo's analysis in comment 8, thanks for finding that! I'm going to mark this as duplicate since it has been resolved for the user. *** This bug has been marked as a duplicate of bug 1828681 *** |
Created attachment 1755001 [details] Error message Description of problem: RHEL 8.2 pops up "libguestfs error: libvirt hypervisor doesn’t support qemu or KVM" when running virt-customize to update a qcow2 image Please see the attachment. Version-Release number of selected component (if applicable): qemu-kvm-15:4.2.0-34.module+el8.3.0+7976+077be4ec.x86_64 How reproducible: Run the following command: # virt-customize --root-password password:redhat \ --uninstall cloud-init \ --selinux-relabel \ --hostname mytest --ssh-inject root:file:/root/.ssh/ssh_public_key.pub\ -a mytest.qcow2 Steps to Reproduce: 1. 2. 3. Actual results: Expected results: No error and it is complete successfully. Additional info: Downgrade qemu-kvm package to the following version, and it works: qemu-kvm-2.12.0-99.module+el8.2.0+7988+c1d02dbb.4.x86_64