[libvirt] changing disk/usb stick content

Roberto Attias (rattias) rattias at cisco.com
Tue Nov 23 22:23:06 UTC 2010


Hello,

This is a request to extend libvirt documentation, explaining how is it
possible to change a floppy/CDROM/usb-stick content for a running VM
from host. 

The VirDomainUpdateDeviceFlags function documentation states:


virDomainUpdateDeviceFlags

int     virDomainUpdateDeviceFlags     (virDomainPtr
<http://libvirt.org/html/libvirt-libvirt.html#virDomainPtr>  domain, 

                                       const char * xml, 

                                       unsigned int flags)





Change a virtual device on a domain, using the flags parameter to
control how the device is changed. VIR_DOMAIN_DEVICE_MODIFY_CURRENT
specifies that the device change is made based on current domain
state.VIR_DOMAIN_DEVICE_MODIFY_LIVE
<http://libvirt.org/html/libvirt-libvirt.html#VIR_DOMAIN_DEVICE_MODIFY_L
IVE>  specifies that the device shall be changed on the active domain
instance only and is not added to the persisted domain configuration.
VIR_DOMAIN_DEVICE_MODIFY_CONFIG specifies that the device shall be
changed on the persisted domain configuration only. Note that the target
hypervisor must return an error if unable to satisfy flags. E.g. the
hypervisor driver will return failure if LIVE is specified but it only
supports modifying the persisted device allocation. This method is used
for actions such changing CDROM/Floppy device media, altering the
graphics configuration such as password, reconfiguring the NIC device
backend connectivity, etc.

 

It would be really nice if you could provide an example of usage of this
command. Thanks to eblake on #virt who pointed me to this:

 

https://www.redhat.com/archives/libvir-list/2010-June/msg00219.html

 

You could easily extract an example of use from there.

 

Thanks,

 

           Roberto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101123/1674af89/attachment-0001.htm>


More information about the libvir-list mailing list