Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VMWare - Virtual operating system static IP address

What is the best way to have a virtual operating system have a static IP address in VMWware. I would like to keep the IP address static since it is a virtual server.

like image 986
Daniel Kivatinos Avatar asked Jan 14 '09 19:01

Daniel Kivatinos


1 Answers

You can configure VMware DHCP server [which runs on host OS] to assign a fix IP address to a VM each time.

According to vmware docs, configuration is stored at the following locations:

Windows XP

C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcp.conf

Windows Vista or Windows 7

C:\ProgramData\VMware\vmnetdhcp.conf

Linux (host-only)

/etc/vmware/vmnet1/dhcp/dhcp.conf

Linux (NAT)

/etc/vmware/vmnet8/dhcp/dhcp.conf

VMWare Fusion for Mac (host-only)

/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf

VMWare Fusion for Mac (NAT)

/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

Static IP and DNS name by MAC example:

host ubuntu {
    hardware ethernet 00:0c:29:c0:2c:58;
    fixed-address 192.168.118.3;
} 

For more details on this please see this blog post.

like image 83
Abhijeet Apsunde Avatar answered Oct 13 '22 20:10

Abhijeet Apsunde