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

  • 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 = "## ## ## ## ## ## ## ## ## ## ## ## ##

Environment

VMware Cloud Director 10.x

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 , Copy vApp operation would change BIOS UUID on the destination virtual machine as a clone task is initiated on vCenter Server.

Note: For the cloned VMs, if the backend.cloneBiosUuidOnVmCopy parameter is set to 0, the cloned VMs will get the unique BIOS UUIDs. However if this parameter is set to 1 then the cloned VMs will also have the same BIOS UUIDs.

For more information on the optimized implementation of the Move operation refer to the Developer Documentation for additional details.

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

Workaround 1: Manually removing the bios UUID from the vmx file

  1. Power OFF the vApp in Cloud director UI
  2. Make a note of the cluster and resource pool of the VM in vcenter.
  3. Remove VM from inventory.
  4. Edit vmx-file and remove all lines starting with uuid.bios
  5. Register VM again to the correct resource pool
  6. Power ON the vApp from Cloud director UI

Workaround 2: Using cloneVapp API to set RegenerateBiosUuid

Note: this workaround in not needed if you have run the cell management tool command which updated the backend.cloneBiosUuidOnVmCopy.

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. Here an example of the Body to be used:

<root:RecomposeVAppParams xmlns:root="http://www.vmware.com/vcloud/v1.5" name="<VM_NAME>" xmlns:ns1="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ns2="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ns3="http://www.vmware.com/schema/ovf">
<root:SourcedItem sourceDelete="false">
<root:Source href="https://<Cloud_Director_FQDN>/api/vApp/vm-########-####-####-####-############" name="<VM_NAME>"/>
<root:VmGeneralParams>
<root:RegenerateBiosUuid>true</root:RegenerateBiosUuid>
</root:VmGeneralParams>
<root:InstantiationParams>
<root:GuestCustomizationSection>
<ns1:Info>Guest Customization Section</ns1:Info>
<root:Enabled>false</root:Enabled>
<root:ChangeSid>false</root:ChangeSid>
<root:JoinDomainEnabled>false</root:JoinDomainEnabled>
<root:AdminPasswordEnabled>false</root:AdminPasswordEnabled>
<root:AdminPasswordAuto>false</root:AdminPasswordAuto>
<root:ResetPasswordRequired>false</root:ResetPasswordRequired>
<root:ComputerName>"<VM_NAME>"</root:ComputerName>
</root:GuestCustomizationSection>
<root:NetworkConnectionSection>
<ns1:Info>Network Connection Section</ns1:Info>
<root:PrimaryNetworkConnectionIndex>0</root:PrimaryNetworkConnectionIndex>
<root:NetworkConnection network="none">
<root:NetworkConnectionIndex>0</root:NetworkConnectionIndex>
<root:IpType>IPV6</root:IpType>
<root:IsConnected>false</root:IsConnected>
<root:MACAddress>##:##:##:##:##:##</root:MACAddress>
<root:IpAddressAllocationMode>NONE</root:IpAddressAllocationMode>
<root:SecondaryIpAddressAllocationMode>NONE</root:SecondaryIpAddressAllocationMode>
<root:NetworkAdapterType>VMXNET3</root:NetworkAdapterType>
</root:NetworkConnection>
</root:NetworkConnectionSection>
<ns1:VirtualHardwareSection>
<ns1:Info>Hardware Section</ns1:Info>
<ns1:Item>
<ns2:Address>0</ns2:Address>
<ns2:Description>SCSI Controller</ns2:Description>
<ns2:ElementName>SCSI Controller 0</ns2:ElementName>
<ns2:InstanceID>2</ns2:InstanceID>
<ns2:ResourceSubType>VirtualSCSI</ns2:ResourceSubType>
<ns2:ResourceType>6</ns2:ResourceType>
</ns1:Item>
<ns1:Item>
<ns2:AddressOnParent>0</ns2:AddressOnParent>
<ns2:Description>Hard disk</ns2:Description>
<ns2:ElementName>Hard disk 1</ns2:ElementName>
<ns2:HostResource root:busType="6" root:busSubType="VirtualSCSI" root:capacity="16384" root:iops="0" root:storageProfileOverrideVmDefault="false"/>
<ns2:InstanceID>2000</ns2:InstanceID>
<ns2:Parent>2</ns2:Parent>
<ns2:ResourceType>17</ns2:ResourceType>
</ns1:Item>
<ns1:Item>
<ns2:Address>0</ns2:Address>
<ns2:Description>IDE Controller</ns2:Description>
<ns2:ElementName>IDE Controller 0</ns2:ElementName>
<ns2:InstanceID>3</ns2:InstanceID>
<ns2:ResourceType>5</ns2:ResourceType>
</ns1:Item>
</ns1:VirtualHardwareSection>
</root:InstantiationParams>
<root:StorageProfile href="https://<Cloud_Director_FQDN>/api/vdcStorageProfile/########-####-####-####-############"/>
<root:ReplaceTpm>false</root:ReplaceTpm>
</root:SourcedItem>
</root:RecomposeVAppParams>
 

Workaround 3: Using instantiateVAppTemplate API to set RegenerateBiosUuid.

Note: this workaround in not needed if you have run the cell management tool command which updated the backend.cloneBiosUuidOnVmCopy.

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