Davoud Teimouri

Virtualization & Datacenter

[How To]: Change Linux IP Address via PowerCLI

How To Change Linux IP Address via PowerCLI


There is some reason that you want to change IP address on virtual machines as an example, moving virtual machines to a new VLAN or port-group or moving them to another site or replicate virtual machine to an offsite recovery site.

Changing IP on machines one by one is very difficult on more than one machine and it be tougher.

PowerCLI has cmdlet that it called “Invoke-VMScript”, the cmdlet lets you to run scripts on guest OS even when guest OS has no IP. But VMware Tools must be installed and also updated VMware Tools is recommended.

Also you must have guest OS credential to run your script.

Sample Script


Here is a sample script to change IP address on multiple VM and also change NFS mount point IP addresses on “fstab” file.

Before run, you must customize the below script and put proper network configuration file within the script:

Read More on Teimouri.Net:

Add existing virtual desktops to “Automated Pool” in VMware View manually

[PowerCLI]: Change Local Account Password on ESXi

[Script]: Find ESXi HBA WWN via PowerCLI

Veeam Backup & Replication – Re-IP Rule on Linux VM

1,653 total views, 19 views today

[How To]: Change Linux IP Address via PowerCLI
4 (80%) 1 Votes

Davoud Teimouri is as a professional blogger, vExpert 2015-2016-2017, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

Updated: 14/11/2017 — 11:07 am

Leave a Reply

Your email address will not be published. Required fields are marked *

Teimouri.net © 2012 Frontier Theme
%d bloggers like this:
Read more:
Horizon View Events Notifier

Chris Halstead wrote an application for reviewing and sending VMware Horizon View server event as notification via email. It's very...

Close