[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] virDomainConfigureDevice?



I'm looking at ways to replicate xm block-configure at the libvirt level. xm block-configure is useful in that it allows you to change the back device for an HVM guest while the guest is still running; this permits you for example to change the CDROM without shutting down your guest or poking around in xenstore. Thus we can have an "eject" button on cdrom devices in virt-manager (or "eject" and "load" buttons, I guess), which we really need.

The issue of course is that xm block-configure is specifically intended for block devices and takes arguments for the back device and the front device (among others). We would naturally prefer to accept a block of XML just as virDomainAttachDevice does and then parse it, determine if the device in question is of a type we can actually edit, determine if the new backdev is appropriate, and so on.

None of this seems terribly hard, but before I go implement it, are there obvious pitfalls I'm not thinking? And given that virDomainAttachDevice is not implemented for qemud in libvirt (is it?), how do we handle the non-xen case?

Thanks,
--Hugh


--
Red Hat Virtualization Group http://redhat.com/virtualization
Hugh Brock           | virt-manager http://virt-manager.org
hbrock redhat com    | virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]