Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

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

 



On Fri, Feb 13, 2009 at 11:35:09AM -0500, Cole Robinson wrote:
> Guido Günther wrote:
> > On Tue, Feb 10, 2009 at 09:32:49PM +0100, Stefan de Konink wrote:
> >> Guido Günther wrote:
> >>> On Mon, Feb 09, 2009 at 11:30:30AM -0500, Cole Robinson wrote:
> >>> [..snip..] 
> >>>> No fault of this patch, but this makes me ask the question: what exactly
> >>>> are attachDevice and detachDevice supposed to do?
> >>>>
> >>>> In the qemu driver, it is entirely hotplug/hotunplug, and deliberately
> >>>> fails on an inactive domain. This patch seems to add offline support
> >>> We don't even persist the devices being hot{added,removed} into the
> >>> domain xml so acting on inactive domains has no meaning or am I missing
> >>> something?
> >> When the domain is enabled, and you store it... you basically get that  
> >> behavior.
> > Exactly my point: when the domain is *enabled*.
> 
> I'm a little lost. My point was basically that with this patch to xend,
> attach/detach has different meanings between the qemu + xend driver.
> 
> qemu :   vm active   : attempt to hotplug the device and persist xml
> 
>                        changes on success, raise error if device is not
>                        not hotpluggable
> 
>          vm inactive : deliberately fail: 'vm must be active'
> 
> xen  :   vm active   : attempt to hotplug device, unknown if changes are
>                        persisted, unknown result if device is not
>                        hotpluggable (unknown to me, anyways)
> 	
> 	 vm inactive : _dont_ fail, add device to VM config

Actually, that's not correct. For Xen <= 3.0.3, the XM driver is used
for inactive guests, and that already supports attach/detach. IMHO,
it is reasonable to support these operations for inactive domains, so
we should do so for all drivers, where practical.

> The libvirt docs for attach/detach device are:
> 
> attachDevice: Create a virtual device attachment to backend.
> detachDevice: Destroy a virtual device attachment to backend.
> 
> Not very helpful. All I want is some understanding of what attach/detach
> is supposed to mean :)

When first added it was only implemented for the XenD driver for active
domains. The XM driver support came later. The docs should be updated to
to 

 - If the VM is active, it attempts to hotplug the device to the guest
 - If the VM is inactive, it updates the VM config file.

We cannot guarentee whether the active hotplugging will update the
persistent config or not, but if possible it should. Currenty XenD
appears to update the config from what I see, though haven't tested
it for real yet

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  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]