VMware Cloud Community
GerVal
Contributor
Contributor
Jump to solution

VMs not getting IP from DHCP

Hello! I'm just switching from Xenserver to ESXi. Created a couple of VMs and neither of them gets an IP from our DHCP server (DHCP server is a physical PC), and instead they get some 192.168.x.y internal number which does not allow them connection to the internet.

Seems like one way to achieve this is to install a VM that is a router, like M0n0wall, and route traffic to connect to outside network and finally get to the internet. But that is not what I need to achieve.

I need to have VMs that are server to get a reserved IP from our DHCP server, and then our local windows client should be able to access them directly.

I have been looking for this on google and forums but I can't seem to find how to configure the VMs to belong to our LAN directly.

I figured VMware would have an easier way to do this than XenServer, but I've been stuck on this for a day now and getting really frustrated as I'm not getting ahead with this project at all, stuck on this little problem...sigh...

Thanks for your help.

Ger.

Reply
0 Kudos
1 Solution

Accepted Solutions
weinstein5
Immortal
Immortal
Jump to solution

ESXi does not provide IP addresses to the VMs it host - if the VMs are not able to access your physical network than one of thw two VMs is acting as the DHCP server - now on to the network issue - If you are not able to reach the VMs from the physical network or reach the physical network form the VMs then there is an issue with the physical connection to the ESXi host possibly the configuration of the physical port that it connects to - a way to test this theory is assign an IP address on the same network as the management port - if you are able to access the vm then  you know the issue is with the switch port -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

Reply
0 Kudos
5 Replies
weinstein5
Immortal
Immortal
Jump to solution

Welcome to the Community - ESXi has no method for answering a DHCP request - are you running any other DHCP servers in your environment? Are you running this ESXi host on top of a Workstation or PLayer? Because bother Player and Workstation will provide IP addresses - 

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
GerVal
Contributor
Contributor
Jump to solution

Hi, thanks for your fast reply.

ESXi is running on an HP server, by itself. On a Dell server I have a server which has DHCP service for all clients.

Truth is I don't even care if I have to statically assign an IP to the VMs, as long as my Windows clients can access them directly on the LAN.

But so far they're inside this VM Network, disconnected from my actual LAN, and my Windows clients cannot reach the VMs, nor can I ssh or RDP into them.

If I give them a static IP, they take it, but I cannot reach them from my LAN clients.

If I don't assign an IP, look at the picture and that's what they get automatically from ESXi.

Is there any way that I can just make the NIC on each VM face my LAN? As if they were real servers been connected to the same switch on my LAN that the actual ESXi host is physycally connected to?

Thanks again.

Reply
0 Kudos
weinstein5
Immortal
Immortal
Jump to solution

ESXi does not provide IP addresses to the VMs it host - if the VMs are not able to access your physical network than one of thw two VMs is acting as the DHCP server - now on to the network issue - If you are not able to reach the VMs from the physical network or reach the physical network form the VMs then there is an issue with the physical connection to the ESXi host possibly the configuration of the physical port that it connects to - a way to test this theory is assign an IP address on the same network as the management port - if you are able to access the vm then  you know the issue is with the switch port -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
KamilAzmer
Hot Shot
Hot Shot
Jump to solution

Its was seems like it's your network configuration issue, not the ESXi or DHCP server.

1. In your network is there are any VLAN required to key-in on the port?

2. Based on the image you given, I saw ESXi is on the 172 segment and there are another esxi vm on the 192. Seems like there would be two segmentation here, and i assumption that your network had 1 VLAN ID for each segment. on the network port configuration had you made the trunk? or you only allow the single VLAN for 172 if yes, then that is issue you had.

My advise is for you to check back your port configuration if there are any VLAN, if you need to use both VLAN ID, you must have to trunk on it and allocated the VLAN ID into you Management and Port Group for the VMs for each of the VLAN ID you had, That why you DHCP is not able to broadcast until your VMs level.

Just my one cents.

Thanks!

@ -- visit my blog at http://www.azmer.my -- @ virtue your mind @ KamilAzmer
GerVal
Contributor
Contributor
Jump to solution

Ok, apparently assigning them the IP myself does work and I can access them from outside.

Is there no way for DHCP traffic to get to a VM then? Would I have to setup a DHCP relay as a VM so that it has a static IP, connects to my real DHCP server and serves IP addresses if needed?

This last part I'm asking because I was hoping I could also setup a few virtual Windows clients for testing purposes, but I guess I will just have to give them an IP to each one...sorry, really missing Xencenter now, but hopefully I will find other features on VMware to make up for this.

Thanks.

Reply
0 Kudos