Skip to content

Commit

Permalink
Since vCenter doesn't allow to create VMs with same name, vcenter
Browse files Browse the repository at this point in the history
  nova-compute driver uses uuid as vm-name (to provide unique name).
  When openStack creates VM on Contrail ApiServer, it sets display_name to UUID.
  When vCenterPlugin does AddPort to vRouterAgent, it needs to passes
  vm-name as uuid and that's what shows up Contrail WebUI.

  Solution is for vcnetr nova-compute driver to set annotation field in
  VM config to VM-name while creating VM.
  Contrail vcenter-plugin will read annotation field if VM's name is it's
  uuid and use it during AddPort.

  Partial-Bug: #1559387

Change-Id: I6d465d35a49c29fab32971688ce88a94589c9987
  • Loading branch information
vaidyasd committed Mar 19, 2016
1 parent 623feb7 commit d9332a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nova/virt/vmwareapi/vm_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def get_vm_create_spec(client_factory, instance, name, data_store_name,
# instance UUID or the instance UUID with suffix '-rescue' for VM's that
# are in rescue mode
config_spec.instanceUuid = name
config_spec.annotation = instance.display_name

# Allow nested ESX instances to host 64 bit VMs.
if os_type == "vmkernel5Guest":
Expand Down

0 comments on commit d9332a2

Please sign in to comment.