VMware Cloud Community
nareshunik
Enthusiast
Enthusiast

need a clone a Linux VM and change hostname, IP,SM,GW

need a clone a Linux VM and change hostname, IP,SM,GW looking for automation. Please suggest.

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Have you looked at New-OSCustomizationSPec and New-OSCustomizationNicMapping?

Dimitar did a series of post on how to use them.

See Working with Customization Specifications in PowerCLI Part 1, Part 2 and Part 3

If some settings can't be done this way, you can always fall back on the Invoke-VMScript cmdlet (but note that it requires the VMware Tools).


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

Reply
0 Kudos