Bug 1459979

Summary: guestfs_add_domain_argv fails with readonly option when vdi/vhd disk is attached to libvirt domain
Product: [Community] Virtualization Tools Reporter: Andy <soliddraenei>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-09 22:14:31 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:

Description Andy 2017-06-08 18:04:20 UTC
Description of problem: guestfs_add_domain_argv fails with readonly option when vdi/vhd disk is attached to libvirt domain


Version-Release number of selected component (if applicable): 1.32.2
libguestfs0/xenial,now 1:1.32.2-4ubuntu2 amd64
libguestfs-tools/xenial,now 1:1.32.2-4ubuntu2 amd64 


How reproducible:
Create libvirt domain (e.g. 'testdomain') and attach vdi disk to it (e.g. /home/dev/test.vdi).
Try to parse the domain with guestfish.

Steps to Reproduce:
1. Run command
guestfish --ro -d testdomain

Actual results:
Error appears
libguestfs: error: invalid value for backingformat parameter 'vdi'

Expected results:
Error does not appear. guestfish launches successfully.

Additional info:
* guestfish launches without error when image is added directly through command line
guestfish --ro -a /home/dev/test.vdi

* The same issue relates to vhd disk
Error for vhd disk is
libguestfs: error: invalid value for backingformat parameter 'vpc'

Comment 1 Richard W.M. Jones 2017-06-08 18:45:23 UTC
A fix was posted for this upstream today [by coincidence?  or
are a lot of people suddenly interested in editing VDI images?]:

https://www.redhat.com/archives/libguestfs/2017-June/msg00043.html

Comment 2 Richard W.M. Jones 2017-06-09 22:14:31 UTC
Upstream in:
https://github.com/libguestfs/libguestfs/commit/5856323e6f35bffd5105b138754bc5e554b2e900

In libguestfs >= 1.37.15.

As this bug is filed against the upstream component, I'm
closing this.  To request a fix against the Ubuntu package
you'll have to file a bug in Ubuntu pointing to the link
above and requesting it to be backported.