[Libvir] virDomainConfigureDevice?
Richard W.M. Jones
rjones at redhat.com
Wed Jul 18 09:40:48 UTC 2007
Hugh Brock wrote:
> 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.
Definitely this will be useful for USB ...
I think the question is: Should we have another entry point
(virDomainConfigureDevice), or should we just modify
virDomainAttachDevice so that if it sees XML for a device which is
already attached it just modifies the device?
> 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?
It seems like it isn't implemented for qemud. Changing the CD-ROM is
possible through the qemu monitor, so it should be.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070718/f7d9737f/attachment-0001.bin>
More information about the libvir-list
mailing list