[libvirt] [PATCH] fix detach-disk for inactive xen domains
crobinso at redhat.com
Sun Nov 15 17:06:59 UTC 2009
On 11/13/2009 06:08 PM, Jim Fehlig wrote:
> detach-disk was not working for inactive xen domains due to lookup of
> device ID from xenstore. When detaching disks there is no need to use
> device id as device name can be used directly. Unfortunately that same
> is not true for network devices. In fact, AFAICT, there is no way to
> "hot unplug" a network device from inactive domain using xen tools.
> I have tested attaching/detaching disks to/from both active and inactive
> domains. I've also ensured no regressions in attaching/detaching
> network devices on active domains and attaching network devices on
> inactive domains. As noted above, detaching network devices from
> inactive domains does not work, but I'm not sure what we can do about
> that since xen tools themselves don't support this. Any suggestions are
> kindly welcomed. Oh, and I also ensured all of these scenarios work
> with both PV and HVM domains.
In the qemu driver, attach + detach are supposedly for hotplug only. If that
isn't the case in the xen driver, then we have some API confusion here.
Personally I think it makes sense to have attach/detach be hotplug operations
only, and any offline device changes should just be done through 'define'.
Maybe we don't want to regress the xen driver in this case, but since things
are currently broken, now is a good opportunity to disable attach/detach for
offline VMs and clarify this API point.
More information about the libvir-list