VMware Global Community
heinzfelfe
Contributor
Contributor

Assign Static IP to VM

Hi,


on my ESXi Server (IP: x.x.x.142 )  I’d like to install an OS on my VMs,

which I created via vSphere Client.

Because DHCP is not available I’d like to assign a new static IP  (say  x.x.x.143) to

each of my VMs.

What needs to be done on the ESXi Host (IP: x.x.x.142 )  in order to achieve that.

The ESXi I can access via ssh

e.g. I get:

~ # esxcfg-route -l

VMkernel Routes:

~ #

Network          Netmask          Gateway          Interface     

x.x.x.0         255.255.255.0     Local Subnet     vmk0          

default          0.0.0.0          x.x.x.252  vmk0          

~ #

~ #

~ #

~ # esxcli network ip route ipv4 list

Network        Netmask        Gateway          Interface  Source

-------------  -------------  ---------------  ---------  ------

default        0.0.0.0         x.x.x.252       vmk0       MANUAL

x.x.x.0        255.255.255.0   0.0.0.0         vmk0       MANUAL

~ #

~ #

~ # esxcli network ip interface ipv4 get

Name  IPv4 Address     IPv4 Netmask   IPv4 Broadcast   Address Type  DHCP DNS

----  ---------------  -------------  ---------------  ------------  --------

vmk0     x.x.x.142                255.255.255.0         x.x.x.255             STATIC             false

~ #

~ #

Is it possible to use a shell command to assign the static IP to VM ? Can I configure

it via vSphere Client ?

Do I need to set up another vmk(1) ?

Are the MAC Address’ of my VMs relevant ?

Can you show me the steps how to do that ?

HowTos ?

Have thanks in advance!

Regards,

Reply
0 Kudos
3 Replies
rcporto
Leadership
Leadership

Is it possible to use a shell command to assign the static IP to VM ? Can I configure it via vSphere Client ?

Better way to assign the static IP is connect to VM console using the vSphere Client and setup the static IP in the same way you do on physical servers.



Do I need to set up another vmk(1) ?

No.



Are the MAC Address’ of my VMs relevant ?

No, unless you are migrating some software from physical server that is licensed to the physical MAC address of your old server.


Can you show me the steps how to do that ?

Just connect to virtual machine console and follow the OS configuration steps, since there is a lot of OS guest, I can't show you step by step how to setup IP address if your guest OS.

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
heinzfelfe
Contributor
Contributor

Dear Richardson,

...have thanks for your target help! That provided orientation.

I succesfully created my VMs now with Debian and Cent OS.

Now I want to install VMWare tools. According to the logs everything's

fine but seems to take time ...

Anyway .... Thanks a lot!

Many Regards,

Johann

Reply
0 Kudos
rcporto
Leadership
Leadership

You're welcome and don't forget mark answer as helpful or correct.

And about the VMware Tools, take a look at this KB article for details: VMware KB: Installing VMware Tools in a Linux virtual machine using a Compiler

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos