When a volume is attached to an instance, the disk_type and
adapter_type are found by making a get_dynamic_property vim
call to the instance. If the adapter_type returned is
"ide", the volume attach fails with "operation cannot be
performed in the current state". This is because VMware IDE
adapter does not support disk hotplug.
Instead of making a get_dynamic_property vim call to the
instance, it should be made to the volume (shadow VM). This
properly indicates what adapter_type is needed by the volume.
If the instance does not have a controller to support the
volume adapter_type (e.g. lsiLogic), one will be added.
If the volume adapter_type is "ide", a exception.Invalid will
be thrown.
Reviewed: https:/ /review. openstack. org/122251 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e3fd9b377c0 82791670ce94ed9 72e0103f88d399
Committed: https:/
Submitter: Jenkins
Branch: master
commit e3fd9b377c08279 1670ce94ed972e0 103f88d399
Author: Thang Pham <email address hidden>
Date: Wed Sep 17 17:14:15 2014 -0400
VMware: Support volume hotplug
When a volume is attached to an instance, the disk_type and property vim
adapter_type are found by making a get_dynamic_
call to the instance. If the adapter_type returned is
"ide", the volume attach fails with "operation cannot be
performed in the current state". This is because VMware IDE
adapter does not support disk hotplug.
Instead of making a get_dynamic_ property vim call to the
instance, it should be made to the volume (shadow VM). This
properly indicates what adapter_type is needed by the volume.
If the instance does not have a controller to support the
volume adapter_type (e.g. lsiLogic), one will be added.
If the volume adapter_type is "ide", a exception.Invalid will
be thrown.
Change-Id: Id826a33298885e 9dbd4b52c9fe518 ed2e6d50469
Closes-Bug: #1226543