Bug 975797

Summary: Specifying virtio interface ('iface' parameter) breaks the direct backend - libguestfs hangs
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bfan, dyasny, leiwang, mbooth, qguan, wshi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 975760 Environment:
Last Closed: 2013-06-19 16:55:22 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:
Bug Depends On:    
Bug Blocks: 975760, 975771    

Description Richard W.M. Jones 2013-06-19 11:28:58 UTC
+++ This bug was initially created as a clone of Bug #975760 +++

$ truncate -s 1G /tmp/image
$ LIBGUESTFS_BACKEND=direct \
  guestfish add-drive-ro-with-if /tmp/image virtio : run -v

libguestfs hangs (actually supermin hangs) when trying to mount
the root (appliance) disk.  The reason is that root=/dev/sdb was
passed on the kernel command line, but the actual disks present
in the appliance are:

  /dev/vda: the added disk
  /dev/sda: the appliance

libguestfs direct backend should be changed so that it doesn't
count virtio-blk disks when calculating the appliance disk's offset.

This affects libguestfs 1.20 and 1.22.

Comment 1 Richard W.M. Jones 2013-06-19 16:55:22 UTC
Fixed upstream in:
f7fe7e8db021b13f40aba56722d6ebe58e3777d2

Regression test:
d8a3185823e608dbddbc6185209951140b8f3b33