VMware Cloud Community
randall310
Contributor
Contributor

Viirtual Machines are using same IP address as ESX Server

I recently began evaluation ESX Server 3.0.1.

I created my first Virtual Machine using Windows XP.

When the Virtual Machine starts, the connection to the VI client is dropped, and the network is interrupted on the ESX server. It the network does recover after the VM has finished booting and obtains it's IP address via DHCP.

I have noticed that the VM uses the same IP address as the ESX Server every time. IPCONFIG /ALL shows the correct DHCP server.

If I manually configure the VM's NIC using a static IP address, there is never a network interruption on the ESX Server.

The ESX server is sharing it's only NIC with the VM's This works OK when doing the same thing on a Windows Host running the VMware Server Free Edition.

What am I overlooking here? How can I get the VM running on ESX server to obtain it's own IP address using DHCP?

0 Kudos
6 Replies
esiebert7625
Immortal
Immortal

The ESX service console has it's own unique IP address. Since you only have one NIC and vSwitch you need to make sure the VM's do not use the same IP as the Service Console. If you are going to use DHCP for your VM's just make sure you exclude this IP address from you DHCP scope or use DHCP reservations.

fyi...if you find this post helpful, please award points using the Helpful/Correct buttons...thanks

0 Kudos
oreeh
Immortal
Immortal

I guess your ESX host gets his IP via DHCP too.

This can't work when using the same NIC for ESX and the Guest.

Since the DHCP requests originate from the same MAC address the DHCP server thinks the same client requests an IP again and therefore DHCP assigns the same IP again.

If the ESX doesn't use DHCP then exclude the ESX IP from the DHCP range as Eric requested.

0 Kudos
juchestyle
Commander
Commander

Hey Randall,

Try this command line to change the ip address of your nic:

esxcfg-vswif -i vswif0

Respectfully,

Kaizen!
0 Kudos
dsanders
Expert
Expert

"Since the DHCP requests originate from the same MAC address the DHCP server thinks the same client requests an IP again and therefore DHCP assigns the same IP again."

Can you please explain a little more? I am far from a network guru but I would have thought the vm would be broadcasting its virtual MAC address. I also think the console may have a virtual MAC address as well.

From the console type:

ifconfig vswif0[/code]

That should show you the MAC (HWaddress) address for the console. Compare that to the MAC in your windows machine.

0 Kudos
oreeh
Immortal
Immortal

Yes this is the theory...

I had the same issue a while ago.

ESX server got his IP from DHCP and the COS and VM network used the same pNIC.

A VM was configured to also get the IP via DHCP.

The ESX and the VM always got the same IP.

As soon as I either gave the ESX a static IP or divided the COS and VM network accross different pNICs it worked.

I'm not sure what exactly caused this behavior but a MAC problem seems to be the best explanation.

0 Kudos
richo67
Enthusiast
Enthusiast

This is very strange.

I have just created new vswif and for it was created new MAC address. I set it up to use DHCP and I saw on network DHCP Discover message with new created MAC address. This of course was different than any other MAC address.

Using ifconfig -a I can see that on all physical nic and virtual vswif the MAC addresses are different.

I can confirm that DHCP DISCOVER message is based on MAC address assigned to particular vswif.

All this on vmware ESX Server 3.0.1

-r-

0 Kudos