« Previous | Next » 

Revision 11714164


Added by Dimitris Aragiorgis over 10 years ago

Hotplug: cmdlib support

Hotpluging is done by functions invoked by ApplyContainerMods(). In
order hotpluging to take place a --hotplug option must be passed.

If no --hotplug is passed during gnt-instance modify the modifycations
will take place after reboot.

A device is hotplug-able if it has a uuid after which it gets named from
the hypervisor perspective.

Before hotpluging a Disk it must be assembled. During
LuInstanceSetParams() newly created disks are not added to the instance
so _ExpandCheckDisks() in _AssembleInstanceDisks() will fail. So we make
this check optional only for this case.

In order to remove a disk (with blockdev_remove) it must be shutdown. So
after unpluging the disk _ShutdownDiskInstanceDisks() must be invoked.

Everything else is just like NIC hotplugging.

Add logging in case of hotplug.

Signed-off-by: Dimitris Aragiorgis <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences