[Kimchi-devel] Libvirt bug ? (Multiple errors in edit guest storage window #405)

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Aug 20 18:46:47 UTC 2014


Hi all,

I have worked to fix https://github.com/kimchi-project/kimchi/issues/405

In problem (2) the cause seems to be an error in libvirt, it is saving 
the device with
wrong protocol, which makes kimchi not return the path.

Reproduce:
1- Create a virtual machine with a local cdrom iso configure. You will 
see a device such as ("virsh edit" shows):
     <disk type='file' device='cdrom'>
       <driver name='qemu' type='raw'/>
       <source file='/ISOS/ubuntu-14.04-server-amd64.iso'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>

2- Create a file with new device (same dev name) configuration, such as 
(/tmp/new-cdrom):
<disk device="cdrom" type="network">
    <driver type="raw" name="qemu"/>
    <target bus="ide" dev="hdc"/>
    <source protocol="http" 
name="/releases/14.04.1/release/ubuntu-14.04.1-desktop-amd64+mac.iso">
       <host port="80" name="cdimages.ubuntu.com"/>
    </source>
</disk>

3- Update the virtual machine device with virsh:
sudo virsh update-device  <VM-NAME> /tmp/new-cdrom

4- Edit the vm xml and you will see that the device was added with "NBD" 
protocol and without HOST information!!! :

<disk type='network' device='cdrom'>
       <driver name='qemu' type='raw'/>
       <source protocol='nbd' 
name='/releases/14.04.1/release/ubuntu-14.04.1-desktop-amd64+mac.iso'/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>

----------------------

Kimchi uses "dom.updateDeviceFlags", the same API.
Notice that this happens when changing from local to remote ISO only. 
Remote to remote works ... and local to local too.
Does anyone have idea why this happens ?

As workaround I can detach, then attach the device again. Thoughts ?

Rodrigo Trujillo








More information about the Kimchi-devel mailing list