How MAC addresses in VMware vCloud Director work

Carsten Landeck
11. November 2020
Reading time: 2 min
How MAC addresses in VMware vCloud Director work

[et_pb_section fb_built=”1″ admin_label=”section” _builder_version=”3.22″][et_pb_row admin_label=”row” _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text admin_label=”Text” _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Automatically assigned MAC adresses

When creating a VM in vCloud Director (vCD), vCD automatically assigns a MAC address. To ensure that the MAC address is unique within the environment the vCD uses the instance ID of the vCD installation to define the MAC address range. If you have multiple vCD instances you might use different IDs for your installations to avoid duplicate MAC addresses.

 

You can customize the instance ID as follows:

  • At Administration/General you will find your installation ID

 

 width=

 

 

 

 

  • When you create a new VM in a vApp the MAC address will be automatically assigned. You can see and reset the Mac address in the hardware properties of a VM.

 

 width=

  • When you reset the MAC a new will be generated and assigned.

 

 width=

Manual assign a MAC address

You can either use the new HTML5 tenant client and put in a valid MAC address manually and save the changes.

 

 width=

 

When you change the Mac address in the backend, directly on vSphere, then vCloud Director will change back the MAC to the address stored ins vCloud Director databaseYou could also use a PowerCLI script to change the MAC address:

Connect-CiServer vCloudDirector.fqdn
$vm = get-civm "win"
$vm.ExtensionData.Section[2].NetworkConnection[0].MACAddress = "00:56:37:0E:05:22"
$vm.ExtensionData.Section[2].UpdateServerData()
$vm.ExtensionData.Section[2].NetworkConnection[1].MACAddress = "00:50:56:02:eb:60"
$vm.ExtensionData.Section[2].UpdateServerData()

 

 width=

 

You can follow the process in vCD:

 

 width=

 

The order of the PowerCLI Array is not always the same as shown in the GUI

 

 width=

 

To verify the configuration, you can double check this with the NIC array returned by the PowerCLI Array.

 

 width=

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]