To set a static MAC address for a virtual machine, you can edit the configuration file of the virtual machine by using the vSphere Client.
Procedure
- Locate the virtual machine in the vSphere Client.
- Select a data center, folder, cluster, resource pool, or host and click the VMs tab.
- Click Virtual Machines and click the virtual machine from the list.
- Power off the virtual machine.
- From the Actions drop-down menu, select Edit Settings.
- Select the VM Options tab and expand Advanced.
- Click Edit Configuration.
- To assign a static MAC address, add or edit parameters as required.
Parameter |
Value |
ethernetX.addressType |
static |
ethernetX.address |
MAC_address_of_the_virtual_NIC |
X next to ethernet stands for the sequence number of the virtual NIC in the virtual machine.
For example,
0
in
ethernet0 represents the settings of the first virtual NIC device added to the virtual machine.
- Click OK.
- Power on the virtual machine.