[Libvir] [PATCH] Allow modifying existing block device, making virDomainAttachDevice modify the device if it already exists
Hugh Brock
hbrock at redhat.com
Thu Sep 6 15:45:39 UTC 2007
The attached patch adds code to xend_internal.c:xenDomainAttachDevice
that checks to see if the device mentioned in the passed-in XML already
exists, and if so calls op_device_configure to modify the device. It is
particularly useful for connecting and disconnecting a hardware cdrom
device to an FV guest.
I considered making new API a la virDomainModifyDevice, but decided
overloading virDomainAttachDevice was cleaner (and didn't change
existing API).
I have tested the patch on f7 with xen 3.1 and a windows 2000 guest.
Since the patch merely wraps Xen's device_configure call, we're not
adding much risk of breakage.
Please ACK.
Take care,
--Hugh
--
Red Hat Virtualization Group http://redhat.com/virtualization
Hugh Brock | virt-manager http://virt-manager.org
hbrock at redhat.com | virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-change-cdrom.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070906/ee00af62/attachment-0001.bin>
More information about the libvir-list
mailing list