vCenter adding NICs and the OS template


#1

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?

Thanks


#2

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.

Thanks


#3

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’]})