VMware Cloud Community
JMAlmagro
Contributor
Contributor

Set-OSCustomizationNicMapping Default Gateway

Hello to all!

I'm writing a script to autodeploy VMs that gets the information from a XML file.

It works, but I have a question about the Set-OSCustomizationNicMapping. That command needs a Default gw and DNS as mandatory parameters.


I have no problems with one adapter, but I tested that if you declare Default GW and DNS Servers as 0.0.0.0 (for second or third NIC) it works too.


I know that this isn't a good workaround, because it's not "elegant", but I want to know what other implications may it have in the virtual machines.


Thanks!



0 Kudos
2 Replies
LucD
Leadership
Leadership

Afaik, that has no real effect on the VM itself.

But the network inside your guest OS might have issues (timeouts, erros...)

Unless you set the final network config for these 2nd and 3th NICs in a different way ?

Are the 2nd and 3th NIC configured as Connect on Startup ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
JMAlmagro
Contributor
Contributor

Hi LucD

Finally I decided to leave all NICs except the first one to DHCP, and then I use Invoke-VMScript to change the IPs to fixed without GW


Thanks

0 Kudos