vsphere-automation-sdk-rest icon indicating copy to clipboard operation
vsphere-automation-sdk-rest copied to clipboard

How change clone vm ip address ?

Open ahmtxonly opened this issue 4 years ago • 0 comments

Hello,

How change clone vm ip address for linux(centos7) and anything Os ?

I have a example with powershell;

"Invoke-VMscript -VM "$clone_name" -ScriptText "echo -e NAME=ens32'\n'TYPE=Ethernet'\n'BOOTPROTO=static'\n'DEFROUTE=yes'\n'PEERDNS=yes'\n'PEERROUTERS=yes'\n'IPV4_FAILURE_FATAL=no'\n'ONBOOT=yes'\n'IPADDR=$VDS_ip'\n'NETMASK=$VDS_netmask'\n'GATEWAY=$VDS_gateway > $filepath" -GuestUser $guest_username -GuestPassword $guest_password -scriptType bash | Out-Null"

ahmtxonly avatar Jun 25 '20 16:06 ahmtxonly