5. vCloud Resource Design : 5.10 Storage Independent of Virtual Machines : 5.10.1 Independent Disk Architecture
5.10.1 Independent Disk Architecture
The independent disk feature consists of the following:
*A database schema to represent independent disks in vCloud Director and their associated backing in vSphere.
*A set of methods that implement the external vCloud Director API by manipulating the database schema and invoking the VIM API.
*A set of event handlers invoked by the VC Listener (Inventory Service) that allows vCloud Director to keep track of relevant vCenter Server activity (for example, vSphere Storage vMotion initiated by vSphere Storage DRS, or the vSphere Client).
Virtual disks in vSphere do not necessarily have unique IDs. For example, when a virtual disk is cloned (virtual machine clone) in vSphere, the new virtual machine receives a unique ID, but the disk IDs are reused. Also, the vSphere disk ID might be changed at any point using the vSphere API, which would break the vCloud Director reference pointer if it were the unique ID.
Therefore, vCloud Director generates and uses its own identifier for independent disks, persisted in the vCloud Director database. vCloud Director does not currently have the API infrastructure to support adding the vCloud Director disk ID to the disk metadata in the VMDK files.
A disk becomes detached in vCenter when a virtual machine using that disk is deleted in vCloud Director, but the disk must be saved for future virtual machines. Because detached disks are not known objects in vSphere, features such as vSphere Storage DRS cannot be used to migrate the detached independent disks. To aid in this situation, vCloud Director creates a virtual machine shell for each detached virtual disk and attaches the disks to the new shell. If the independent disk must be attached to a new virtual machine, the shell is deleted.
If a delete action takes place before an attach action, vCloud Director performs a check to verify that the disk is attached to a virtual machine object before completing the delete request to avoid inadvertently deleting the independent disk.
If actions are taken against the vCenter (through the UI or API), certain update actions are either safe or unsafe to perform:
*vSphere Storage vMotion or virtual machine relocate actions are safe actions to perform. vCenter updates vCloud Director with the revised locations of the disk files.
*Disk add and disk remove actions and the associated disk locations are unknown to vCloud Director and are therefore unsafe to perform.