]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Set virtual disk UUID to volume ID
authorVipin Balachandran <vbala@vmware.com>
Mon, 27 Jul 2015 07:57:46 +0000 (13:27 +0530)
committerVipin Balachandran <vbala@vmware.com>
Thu, 13 Aug 2015 10:09:00 +0000 (15:39 +0530)
commit92be3ae71ad2162091f92524a8c3034b85d222ad
treef3ca95f600787e4838297760ea1cf372b219fb3d
parentcb98bb48f1af590ecdc0f5e064fdad31ef61eec8
VMware: Set virtual disk UUID to volume ID

The symlinks in /dev/disk/by-id/ (in a Linux guest OS running in VMware
ESX based Nova instance) use UUID of virtual disk as the SCSI device ID
when disk.EnableUUID is set to True in the virtual machine configuration
file. This patch sets the UUID of virtual disk corresponding to a Cinder
volume (at the time of volume creation) to volume ID so that end-users
(of Nova instance) can identify the device corresponding to an attached
volume in the guest using /dev/disk/by-id symlink.

For example, given a Cinder volume with ID = xyz, user can identify the
device corresponding to the volume in instance's guest using the symlink
/dev/disk/by-id/scsi-xyz provided disk.EnableUUID is set to True in the
instance's virtual machine configuration file (in ESX).

Note: If the UUID of the virtual disk corresponding to a volume is unset
at the time of volume creation, a random UUID will be used.

Closes-Bug: #1475738
Change-Id: I8f9d210083010b25833a7b108ae135417c72fd09
cinder/tests/unit/test_vmware_vmdk.py
cinder/tests/unit/test_vmware_volumeops.py
cinder/volume/drivers/vmware/vmdk.py
cinder/volume/drivers/vmware/volumeops.py