Cinder VMDK driver : uuid of VMDK disk file needs to be the same as of corresponding Cinder volume ID

Bug #1475738 reported by Sunitha K
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Wishlist
Vipin Balachandran

Bug Description

When we create Cinder volume of VMDK type, the uuid of virtual disk is auto-generated. Because of this it's difficult for an end user to identify the Openstack Cinder created/attached volumes from within the guest OS.
Change proposed - use the uuid of Cinder volume as the uuid for Virtual disk as well when the shadow VM template is updated in Cinder VMDK driver.

Tags: drivers vmware
Revision history for this message
Johnson koil raj (jjohnsonkoilraj) wrote :

To view the volume uuid inside the guest vm, the vmx file needed to be updated with disk.EnableUUID = True

affects: cinder → nova
Revision history for this message
Sunitha K (sunitha-kannan) wrote :

Related defect report in Nova
- https://bugs.launchpad.net/nova/+bug/1475740

affects: nova → cinder
Revision history for this message
Vipin Balachandran (vbala) wrote :

> Because of this it's difficult for an end user to identify the Openstack Cinder created/attached volumes from within the guest OS.
How is to going to help *end-user* to identify the volume within *guest OS* if we set the vmdk uuid to volume UUID? Why can't the end-user identify the volume using the device name?

Are there any other use cases to support this?

Changed in cinder:
importance: Undecided → Wishlist
status: New → Incomplete
assignee: nobody → Vipin Balachandran (vbala)
tags: added: vmware
tags: added: drivers
Revision history for this message
Sunitha K (sunitha-kannan) wrote :

The VMDK disk file name is not available to the user when logged into the Linux Guest OS. Please let me know if there is a way to get that.

Changed in cinder:
assignee: Vipin Balachandran (vbala) → Sunitha K (sunitha-kannan)
assignee: Sunitha K (sunitha-kannan) → nobody
Revision history for this message
Sunitha K (sunitha-kannan) wrote :

Defect is reported by a partner team doing PaaS on top of Openstack KVM and ESX and trying to stay out of hypervisor specific checking.

Behaviour on Linux VM hosted on KVM compute –

When user attach volumes created by OpenStack to instances running on KVM compute, the SCSI disk gets listed in /dev/disk/by-id. Based on this scan the application running on this VM is able to figure out the OpenStack volumes and mount them etc.

Behaviour on Linux VM hosted on ESX compute –

When user attach volumes created by OpenStack, the SCSI disk DOES NOT get listed in /dev/disk/by-id. Referring the VMware documentation this seems to be default behavior where in VMWare doesn't provide information needed by udev to generate /dev/disk/by-id. Hence there is no link in /dev/disk/by-id for SCSI (sdx) devices by default.

The work around given is to set disk.EnableUUID to True for the Linux VM. In case of Openstack volumes, as the uuid of virtual disk/VMDK disk is autogenerated, if user tries to enable this property the /dev/disk/by-id shows the autogenerated uuids for the VMDK disks. Due to this the user/application has no means to identify the Openstack volume. Instead if the uuid of VMDK disk is same as the Openstack volume ID, it helps in identifying the Openstack created volumes.

This problem needs to be addressed in order to enable the integration being done by the PAAS team.

Revision history for this message
Jyoti Ranjan (jyoti-ranjan) wrote :

It will be great if we get a solution which is agnostic to guest operating system as workload might run Windows as well instead of KVM. In short, there is need to find a solution where cinder volume presented to guest can be mapped to cinder volume ID irrespective of whether guest OS is windows, KVM or something else.

Changed in cinder:
assignee: nobody → Vipin Balachandran (vbala)
Changed in cinder:
status: Incomplete → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/205494

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/205494
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=92be3ae71ad2162091f92524a8c3034b85d222ad
Submitter: Jenkins
Branch: master

commit 92be3ae71ad2162091f92524a8c3034b85d222ad
Author: Vipin Balachandran <email address hidden>
Date: Mon Jul 27 13:27:46 2015 +0530

    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

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.