MaheshThawari
Contributor
Contributor

Adding and Updating Nic after Vm Provisioning.

Hi...

Can we add/update additional vNic with specified IP details like Ip address, gateway, dns after Vm Provisioning ?

Thanks

Mahesh Thawari

0 Kudos
1 Reply
admin
Immortal
Immortal

Yes, you can modify an existing vNic properties like IP address, gateway and dns, after vm has been provisioned, using the customizevm_task. This call requires a customizationspec to be provided with the details of the customizations required on the vm.

CustomizationSpec.nicSettingMap should be populated with the IP settings that you would like to change or assign to a particular virtual network adapter.

The AdapterMapping object maps a network adapter's MAC address to its Adapter settings object. This will allow you to the ip, dnsDomain, dnsServerList, gateway, subnetMask etc.

For more details you may refer the API Reference Guide, http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/index.html

In case you would like to add new vNic card, you can use the ReconfigVM_task, where you will need to populate the deviceChange property with details of the additional vNic to be added in the ConfigurationSpec.

0 Kudos