]> xenbits.xensource.com Git - libvirt.git/commit
qemu: driver: Fix cold-update of removable storage devices
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Mar 2015 16:12:12 +0000 (17:12 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Mar 2015 16:11:37 +0000 (17:11 +0100)
commitd0dc6c036914da4905c3f483be3036014a38fe9b
treea7983c83bbda5f863984e6096798170e26c43e5b
parente7974b4f80f320c9232ff31762fd1aa82a590f2e
qemu: driver: Fix cold-update of removable storage devices

Only selected fields from the disk source were copied when cold updating
source in a CDROM drive. When such drive was backed by a network file
this resulted into corruption of the definition:

    <disk type='network' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source protocol='gluster' name='gluster-vol1(null)'>
        <host name='localhost'/>
      </source>
      <target dev='vdc' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>

Update the whole source instead of cherry-picking elements.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1166024
src/qemu/qemu_driver.c