vmware-archive / vcd-cli

Command Line Interface for VMware vCloud Director
https://vmware.github.io/vcd-cli
Other
165 stars 105 forks source link

RFE: Specify fixed MAC address for a NIC of a VM #509

Open pasikarkkainen opened 4 years ago

pasikarkkainen commented 4 years ago

"vcd vm add-nic" should have an option to specify a fixed MAC address (if/when needed) for the NIC. Also it should be possible to update a given NIC, and change the MAC address, via "vcd vm update-nic".

There are various usage scenarios (mostly related to legacy software, or networking related restrictions) where the VMs / NICs must have a given, hardcoded MAC address, so vcd cli should have the possibility to configure such a setup.

vCloud API makes it possible to configure fixed MACs for NICs. An example via powercli:

$vm = get-civm "MyVMName"
$vm.ExtensionData.Section[2].NetworkConnection[0].MACAddress = "00:50:56:12:34:56"
$vm.ExtensionData.Section[2].UpdateServerData()