How To Assign A Static IP Address To A VMware Workstation VM

Shehu Awwal
Shehu Awwal
Published in
2 min readAug 4, 2019

--

I really enjoy working with Virtualization both type 1 and 2, But It came to a time that I need to assign a static IP Address to my virtual machines in any network connection mode, NAT, Bridged or Host-Only.

Before I came across this, I tried setting up Mikrotic Router OS in other to achieve this options, and looking for other alternative ways, But didn’t know the option is already available.

I have my VMware Workstation on Windows 10 as the host, Then I have upto 15 Virtual Machines, I have different OS including Windows XP, 7, CentOS, LinuxMint, Ubuntu Server and some other Custom OS.

My NAT has been configured to be DHCP, And Configured my IP Address to 2.2.2.1 for easy remembrance, Take a look at how mine looks like.

Look at the Name, VMnet8 so that’s the one we need to edit, depending, I will show you my config files.

Go to:

C:\ProgramData\VMware\

Scroll Down and look for this file and edit: vmnetdhcp.conf

Scroll Down And You Will See This Line:

host VMnet8 {
hardware ethernet 00:50:56:C0:00:08;
fixed-address 2.2.2.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
option routers 0.0.0.0;
}

So, Just add this line to make yours work, for example this is how my configuration looks like,

#Ubuntu x86
host VMnet8 {
hardware ethernet 00:0C:29:F0:7C:73;
fixed-address 2.2.2.7;
}

The #Ubuntu is a comment for me to identify which virtual machine has that Mac Address, And IP Address,

Just add the Mac Address of the Virtual Machine you wish to set a Static IP Address for by going to Vmware Workstation / Player, Settings > Network Adapter > Advanced There you will see the MAC Address And Copy, Then Edit The Fixed Address With How You Configure Your NAT.

This is how my configuration looks like for each Virtual Machine:

Then Save the file, But you will need to Restart the VMware DHCP Service, Open Command Prompt As An Administrator.

net stop vmnetdhcp
net start vmnetdhcp

That’s All, If you have any question let me know, Thanks To BytealManac for his post.

--

--

Shehu Awwal
Shehu Awwal

Hacker — Passionate About InfoSec, Linux, Clouds, Containers, Virtualization, Distributed Systems And Architectures And New Trends.