Bugzilla – Bug 1215461
guestfs-tools unable to determine guest arch
Last modified: 2023-10-26 07:13:40 UTC
Created attachment 869581 [details] Debugging output from running the failing virt-sysprep command I use the virt-sysprep command to prepare OS image files (qemu2 format) for use as KVM images. One preparation task is to define the salt minion name, by adding the argument --run-command 'echo -e "# vi:filetype=yaml\nid: $MINION_ID" >/etc/salt/minion.d/id.conf' to the virt-sysprep command. When running the virt-sysprep command, I get the following error: virt-sysprep: error: host cpu (x86_64) and guest arch (unknown) are not compatible, so you cannot use command line options that involve running commands in the guest. Use --firstboot scripts instead. If reporting bugs, run virt-sysprep with debugging enabled and include the complete output: virt-sysprep -v -x [...] However, it used to work flawlessly until recently, so some sort of regression has occurred. I guess the problem is that virt-sysprep is no longer able to identify the architecture of the guest OS in the image file. The image contains a standard Leap 15.5 server installation for amd64, the same arch as the host system. Unfortunately, I can't pinpoint exactly when this issue started occurring, but I last used the tool successfully on 2023-09-01.
Could you please use the below leap 15.1 image instead of your image to see what happens? https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-15.1.0-kvm-and-xen-Current.qcow2
(In reply to Lin Ma from comment #1) > Could you please use the below leap 15.1 image instead of your image to see > what happens? > > https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1- > JeOS.x86_64-15.1.0-kvm-and-xen-Current.qcow2 Using the linked image produces the same error.
(In reply to Lin Ma from comment #1) > Could you please use the below leap 15.1 image instead of your image to see > what happens? > > https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1- > JeOS.x86_64-15.1.0-kvm-and-xen-Current.qcow2 Just for reference: Using the linked image, the following command reproduces the error: virt-sysprep -a openSUSE-Leap-15.1-JeOS.x86_64-15.1.0-kvm-and-xen-Current.qcow2 --run-command 'uname -a'
I did some tests: 1. Verify the issue via virt-sysprep of guestfs-tools-1.50.1 in Tumbleweed host. 2. Verify the issue via virt-sysprep of guestfs-tools-1.48.3 in Tumbleweed host. 3. Verify the issue via virt-sysprep of guestfs-tools-1.50.1 in Leap 15.5 host. 4. Verify the issue via virt-sysprep of guestfs-tools-1.48.3 in Leap 15.5 host. The issue can't be reproduce in 1 and 2, only reproducible in 3 and 4. So the root cause of this issue seems not in guestfs-tools package, It's probably in guestfs-tools's dependencies. CC Charles for further processing.
Could you please install the libguestfs RPMs from this location and try virt-sysprep again? https://download.opensuse.org/repositories/home:/charlesa/15.5/x86_64/ Thanks
(In reply to Charles Arnold from comment #5) > Could you please install the libguestfs RPMs from this location and try > virt-sysprep again? > > https://download.opensuse.org/repositories/home:/charlesa/15.5/x86_64/ Using those RPMs, it works as expected.
(In reply to Olav Reinert from comment #6) > (In reply to Charles Arnold from comment #5) > > Could you please install the libguestfs RPMs from this location and try > > virt-sysprep again? > > > > https://download.opensuse.org/repositories/home:/charlesa/15.5/x86_64/ > > Using those RPMs, it works as expected. Thanks for testing. A submission will be made soon containing this fix.
This is an autogenerated message for OBS integration: This bug (1215461) was mentioned in https://build.opensuse.org/request/show/1113550 Factory / libguestfs
SUSE-RU-2023:4088-1: An update that has five fixes can now be installed. Category: recommended (moderate) Bug References: 1212972, 1215461, 1215543, 1215586, 1215664 Sources used: SUSE Linux Enterprise Micro 5.5 (src): libguestfs-1.48.6-150500.3.8.1 Server Applications Module 15-SP5 (src): libguestfs-1.48.6-150500.3.8.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
This fix should now be available in the update channel.
It is - has been since comment #10 was posted. Thank you.