Re: virDomainConfigureDevice?

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

 



On Wed, Jul 18, 2007 at 10:40:48AM +0100, Richard W.M. Jones wrote:
> 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?

I don't mind too much either way. The only benefit a separate entry point 
would give is ability for an app to get an error back if they tried to
modify a device which didn't exist. Whether they're separate or same
entry point the underlying impls will be able to share a reasonable
amount of code.

> >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.

I intend to implement it when adding support for USB disk & device
passthrough in QEMU/KVM. It will use the monitor for adding/removing
USB devices on the fly. Likewise we can do CDROM media changes this
way.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]