Description of problem: This guest has two block devices, a regular disk and a read-only install CD. The part-list API is unable to parse the output of parted on the CD-ROM: $ sudo virt-alignment-scan -d WinXP -x libguestfs: trace: add_domain "WinXP" "readonly:true" "allowuuid:true" libguestfs: trace: add_domain = 2 libguestfs: trace: launch libguestfs: trace: launch = 0 libguestfs: trace: list_devices libguestfs: trace: list_devices = ["/dev/vda", "/dev/vdb"] libguestfs: trace: part_list "/dev/vda" libguestfs: trace: part_list = <struct guestfs_partition_list *> /dev/sda1 32256 512 bad (alignment < 4K) libguestfs: trace: part_list "/dev/vdb" libguestfs: trace: part_list = NULL (error) libguestfs: error: part_list: could not parse row from output of parted print command: /dev/vdb:617756672B:virtblk:512:512:unknown:Virtio Block Device; This is not particularly surprising, because the output of parted is (yet again) screwed up: # guestfish --ro -d WinXP run : debug sh "parted -m -- /dev/vdb unit b print" Error: /dev/vdb: unrecognised disk label BYT; /dev/vdb:617756672B:virtblk:512:512:unknown:Virtio Block Device; Note the extra "Error" line sent to stdout, even though we have specified the -m option. Version-Release number of selected component (if applicable): libguestfs-1.13.20-1.fc17.x86_64 parted-3.0-3.fc17.x86_64 How reproducible: 100% Steps to Reproduce: 1. Add en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso to guest as CD-ROM. 2. Try 'part-list' command on the CD-ROM device.
Proposed patch (to parted) sent upstream: http://lists.alioth.debian.org/pipermail/parted-devel/2011-October/thread.html#3944
A simple reproducer for this is: $ dd if=/dev/urandom of=/tmp/test.img bs=1k count=500 500+0 records in 500+0 records out 512000 bytes (512 kB) copied, 0.0474926 s, 10.8 MB/s With this random disk image, in guestfish: ><fs> part-list /dev/vda libguestfs: error: part_list: could not parse row from output of parted print command: /dev/vda:512000B:virtblk:512:512:unknown:Virtio Block Device:; and directly in parted: $ parted -m -s -- /tmp/test.img unit b print 2> /dev/null Error: /tmp/test.img: unrecognised disk label BYT; /tmp/test.img:512000B:file:512:512:unknown::; (Notice that the error message was sent to stdout) With the inclusion of my patch (comment 1) in parted 3.1, the parted command works and libguestfs is fixed without needing any changes. Note that the fix is included in parted 3.1 in Fedora >= 18. Fedora 17 still contains the broken version of parted. Closing this bug with resolution "RAWHIDE".
*** Bug 842551 has been marked as a duplicate of this bug. ***