« Previous | Next » 

Revision e8e50805


Added by Dimitris Aragiorgis over 10 years ago

(2.10) Hotplug: cmdlib support

Hotplugging is done by functions invoked by ApplyContainerMods(). In
order hotplugging to take place the --hotplug option must be passed
otherwise the modifications will take place after reboot.

NIC hotplug supports add, remove and modify. The modify is done by removing
the existing NIC and adding a new one in the same pci slot.

Disk hotplug supports add and remove. Before hotplugging a Disk it
must be assembled. Use blockdev_assemble RPC, get the device link_name
and then call hotplug RPC command.

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

For both device types we use the generic RPC call_hotplug_device.

Also adapt unit tests to follow the change.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

cmdlib unittests do not exist in stable-2.8
The other were easy to resolve


Signed-off-by: Dimitris Aragiorgis <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences