Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1086815

Summary: VMware: instance names can be edited, breaks nova-driver lookup
Product: Red Hat OpenStack Reporter: Scott Lewis <sclewis>
Component: openstack-novaAssignee: Matthew Booth <mbooth>
Status: CLOSED ERRATA QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0 (RHEL 7)CC: breeler, mbooth, ndipanov, sgordon, tdunnon, vpopovic, yeylon
Target Milestone: asyncKeywords: ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-nova-2013.2.3-9.el6ost Doc Type: Enhancement
Doc Text:
This enhancement allows administrators to rename vSphere virtual machines created by Compute. Previously, Compute used a virtual machine's name to look it up in vSphere, which meant that renaming a virtual machine would make it inaccessible to Compute. However, administrators may want to organise virtual machines in vSphere according to their own conventions. With this change, administrators can now safely rename a vSphere virtual machine created by Compute. Compute now uses other metadata to look up the virtual machine, so it will continue to work.
Story Points: ---
Clone Of: 1080621 Environment:
Last Closed: 2014-08-21 00:40:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1080621    
Bug Blocks: 1055536    

Description Scott Lewis 2014-04-11 14:55:24 UTC
+++ This bug was initially created as a clone of Bug #1080621 +++

Description of problem:

Currently the VMware Nova Driver relies on the VM name in vCenter/ESX to match the UUID in Nova. The name can be easily edited by vCenter administrators and break Nova administration of VMs. A better solution should be found allowing the Nova Compute Driver for vSphere to look up VMs by a less volatile and publicly visible mechanism.

EDIT:
A fix would make the link between vSphere and Nova more solid and involve using a vSphere metadata value that cannot be easily edited. Currently the UUID is stored as an extra config metadata property inside vSphere (associated with the instance's virtual-machine) and
this value is not easy to accidentally change. That would make the link much more robust.

--- Additional comment from Matthew Booth on 2014-04-10 11:16:37 EDT ---

The change listed is dependent on 2 other changes, which I have also backported:

https://review.openstack.org/#/c/55038/
https://review.openstack.org/#/c/60259/
https://review.openstack.org/#/c/59571/

Comment 6 Jaroslav Henner 2014-07-21 13:30:31 UTC
# nova boot --flavor m1.small  --image cirros-0.3.1-x86_64-disk.vmdk foo
* edit the VM name in the vcenter
# nova delete foo

this removed the VM from the VCENTER.


I also tried creating two VMs, rename one of them in the VCENTER, upgrade nova, restart nova, and delete the VMs in openstack. Both VMs got deleted from the vCenter.

Comment 8 errata-xmlrpc 2014-08-21 00:40:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-1084.html