VM BIOS UUIDs are not unique when virtual machines are deployed from vApp templates
search cancel

VM BIOS UUIDs are not unique when virtual machines are deployed from vApp templates

book

Article ID: 321451

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • When using VMware Cloud Director, multiple virtual machines in vCenter Server have the same BIOS UUID.
  • This issue is seen when editing the .vmx file of a virtual machine.

    For example:


    uuid.bios = "42 16 33 b9 01 76 de 61-c2 03 aa 2d 73 64 2c e3"


Cause

In the default system configuration, all virtual machines that are created when you deploy a vApp template or an OVF upload are assigned the same BIOS UUID.

Resolution

This behavior is controlled by a system configuration value named CloneBiosUuidOnVmCopy on VMware Cloud Director.

  • 1 (true) means to keep the existing BIOS UUID, and is the default value.
  • 0 (false) means to generate a new BIOS UUID.

You can use the manage-config subcommand of the cell-management-tool to view or set the value of this property. To retrieve the current value of this property, use the command:

$VCLOUD_HOME/bin/cell-management-tool manage-config --lookup --name backend.cloneBiosUuidOnVmCopy

Property "backend.cloneBiosUuidOnVmCopy" has value "1".


To set this property to a value of 0, use the command:

$VCLOUD_HOME/bin/cell-management-tool manage-config -n backend.cloneBiosUuidOnVmCopy -v 0

Updating property: Property "backend.cloneBiosUuidOnVmCopy" has value "0".


Note:Restart of the Cloud Director cells in the server group after you make this change is not required in the latest Cloud director 10.x versions.

Note: This change does not affect previously existing virtual machines. Also, note that
backend.cloneBiosUuidOnVmCopy should be 0 for vSAN environments as vSAN health checking has a requirement for unique bios.uuids. Duplicate bios.uuids will give false positives for vsan.check_state find_inconsistent_vms.

Note: Post setting cloneBiosUuidOnVmCopy parameter to 0 , both Copy vApp and Move vApp operation would change BIOS UUID on the destination virtual machine as a clone task is initiated on vCenter Server for both operations.

Starting vCD 9.0 a new optimized implementation of the Move operation is introduced, refer to the Developer Documentation for additional details.


Workaround:
Any of the following workarounds can be used to update the BIOS UUID for existing VMs:

Workaround 1: Manually removing the bios UUID from vmx file

1. Power OFF the vApp in Cloud director UI
2. From vCenter datastore browser,download the vmx
3. Rename the existing vmx file to vmx.bak format
4. Open the downloaded file and manually remove the line starting
uuid.bios =""
5. Upload the changed vmx file to the datastore via datastore browser.
6. Power ON the vApp from Cloud director UI
7. Check from vCenter datastore browser and verify the new
uuid.bios ="" line is populated

Workaround 2: Using cloneVApp API to set RegenerateBiosUuid.

Note: Source VM might have to be shutdown to carry out the clone operation.

POST /vdc/{id}/action/cloneVApp


Update the lines between <root:VmGeneralParams>...</root:VmGeneralParams> to set the regenerate UUID option.

<root:SourcedItem>
<root:Source href="https://vcloud.example.com/api/vApp/vm-<VM_UUID>"/>
<root:VmGeneralParams>
<root:RegenerateBiosUuid>true</root:RegenerateBiosUuid>
</root:VmGeneralParams>
<root:InstantiationParams>

Workaround 3: Using instantiateVAppTemplate API to set RegenerateBiosUuid.

POST /vdc/{id}/action/instantiateVAppTemplate


Update the lines between <root:VmGeneralParams>...</root:VmGeneralParams> to set the regenerate UUID option.

<root:SourcedItem>
<root:Source href="https://vcloud.example.com/api/vAppTemplate/<VM_UUID>"/>
<root:VmGeneralParams>
<root:Name>vmname</root:Name>
<root:RegenerateBiosUuid>true</root:RegenerateBiosUuid>
</root:VmGeneralParams>
<root:InstantiationParams>



Additional Information