vCenter adding NICs and the OS template

Hi All, have to return to this topic Are there any recommendations for the VMWare OS template (RHEL & Windows) with regards to their configured nics? Is it possible to have an OS template without any nics configured?

Also, I havent seen any options to set the default gateway for nics? Customization Spec are an option, but that would only set one (or the first?). Is this something thats typically is set/inherited from the vlan/network selection? So the network setup in vcenter has that defined?


Hey @gmccullough @georgegoh We have made some progress in that NICs configured in the OS template do override CF set nic methods. We’ve now updated the OS templates so the primary/first NIC is there but no further config, eg ip address, subnetmask and default gateway.

While the set nic methods are able to config ip and subnet mask, how do we do default gateways? There is the option via prov.set_option(:gateway, x.x.x.x) but that would only work for the primary/first? We have cases where the VMs are getting additional NICs added.


OK, so the obvious seems to work. Add the option to the method…

@task.set_nic_settings(0, {:ip_addr => vmip, :subnet_mask => vmnetsm, :gateway => gw, :addr_mode => [‘static’, ‘Static’]})

@dan I am trying to add an additional NIC to VM after provisioning is completed (already deployed VM) running on VMware 6.5. Do you have any suggestion on how I could do that? I do not want to tweak customization spec as majority of my VM would not have more than one NIC.

@pemcg - help please!