Description of problem: Virtualization test day uncovered this. I ran virt-inspector on a 32-bit host, but pointed it to a 64-bit VM disk image (same results for both raw and qcow2 images). Version-Release number of selected component (if applicable): libguestfs-1.5.18-1.fc14.2.i686 libguestfs-tools-1.5.18-1.fc14.2.i686 How reproducible: Always. Steps to Reproduce: 1. # virt-inspector /mnt/backup/opt/libvirt/images/rhel_6-64.qcow2 2>&1 |head Actual results: Error running rpm -qa: command_lines: rpm: Exec format error at /usr/lib/perl5/Sys/Guestfs/Lib.pm line 1358. linux rhel x86_64 6.0 (Red Hat Enterprise Linux Server release 6.0 (Santiago)) on /dev/vg_vmrhel664/lv_root: Mountpoints: /dev/vg_vmrhel664/lv_root / /dev/sda1 /boot /dev/vg_vmrhel664/lv_swap swap Filesystems: /dev/sda1: label: UUID: f101fb8b-4416-4b44-993e-3eb45bcec550 Expected results: Lose the "Error running rpm -qa: command_lines: rpm: Exec format error at /usr/lib/perl5/Sys/Guestfs/Lib.pm line 1358." message at startup. Additional info:
We need to detect the 64-on-32 case and disable trying to run any commands in the guest when this happens.
New version of virt-inspector doesn't run rpm commands like this, and as such we expect it to work (it certainly works on the 32-on-64 case, but I can't test the other way around).