1

I'm setting up a test lab for VMware in Hyper-V. I have 3 vSwitches in Hyper-V: -EXT01 -INT01 -INT02

I've also created a W2K12 VM in Hyper-V which has the following roles installed: -AD/DNS -DHCP -File (configure iSCSI in the future as shared storage).

Now, I connected 3 NICs to ESX01 and they're attached to all of the 3 vSwitches above (EXT01, INT01 and INT02). Now, only one is enabled by default (the Ext01, which connects to my own network and has everything configured, including a default gateway), it gets a DHCP address and I'm able to access it using vSphere Client. If I disable the Ext NIC in the ESXi and enable INT01 NIC (or 02) or if I just attach the INT01 (or 02) network to NIC1, I do get an IP address from DHCP (the 2k12 machine above, which is connected to INT01 and INT02 and they server their own scopes), all set correctly, with no Gateway, but I'm unable to reach the ESXi through vSphere Client and I can't even ping it. All works again when I re-enable the External network.This tells me that the issue is definitely in the network configuration (internal) but I'm not sure where else to look or what to change? As this was a lab I wanted to leave it with no GTW as I don't need routing from one network to another (that's also why I have INT01 and 02).

EDIT: I forgot to mention that any other Windows machine connected to the INT01 or 02 network is able to get an address and to ping other devices on the network.

Thanks

2
  • Please add network configuration diagrams / schematics. Am I correct in thinking you are running ESXi as a guest on hyper-V? and you want the ESXi server to acquire a DHCP address for the management network? May 28, 2015 at 11:35
  • You assumed correctly and I finally found the answer to my question. I ran in an infinite loop until I found the solution. Will try to answer this question myself.
    – Something
    May 31, 2015 at 13:50

1 Answer 1

1

for whoever is interested, I've found the solution myself. Firstly, I will give you a better overview of what I wanted to achieve.

Problem So, I have a physical box connected to the office network. This physical box is running Hyper-V and has got 3 virtual switches. One External (EXT01, connected to the office network through one of the server's physical NICs), the other two are Internal switches (not private, so they, once created, will create a virtual NIC on the Physical box automatically; in my case I will have 2 virtual NICs added to the physical host) called INT01 and INT02. In Hyper-V I have a W2K12 R2 VM running the following roles: - Domain Controller - DNS - File Services - DHCP

I have connected two virtual NICs to this VM: - One connected to INT01 - One connected to INT02

As there are no network devices on both internal networks, I manually added the following config for INT01: IP 192.168.100.100 Subnet 255.255.255.0 Gtw: left blank DNS: 192.168.100.100

INT02 on this VM has got the following config: IP 192.168.101.100 Subnet 255.255.255.0 Gtw: left blank DNS: 192.168.101.100

So far so good. Now, I created two scopes, one serves 192.168.100 addresses and the other one takes care of 192.168.101. The scopes will both provide the same subnet (255.255.255.0), they'll leave the default gtw blank and they will also provide a DNS server address which match the VM's NIC IP, so 192.168.100.100 for INT01 and 192.168.101.100 for INT02.

As soon as I configured the DHCP scopes and ran ipconfig /release and /renew on the Hyper-V host, its two virtual NICs I talked about above, got an IP address (192.168.100.200 for the vNIC connected to INT01 and 192.168.101.200 for INT02). I can access the VM through 192.168.100.100 and 101.100 with no problem, I can ping it, RDP on it, access its shares, all from the physical Hyper-V host. So far, everything looks as it should and works as expected.

Now, one I set up a new ESXi and connect it to either INT01 or INT02, it gets an IP address from the DHCP, but then it dies there, not reachable what so ever whilst my other servers can talk to each other.

The reason why I want the ESXi to be connected to 3 networks is the following: - EXT01 to be used as management and will be accessible from my office - INT01 to be used for vmotion etc - INT02 to be used for the ESXi's VMs (I want any VM created on the ESXi to get an IP from the external 2k12 box)

I don't need to access other subnets from the internal networks, so I'm happy to leave the traffic as local. So when I'm pinging 192.168.100.100, traffic will only go through INT01, when I ping 10.0.2.50 (my office network), traffic will go through the EXT vSwitch and when I ping 192.168.101.100, traffic will have to go through INT02. And this works on 2k12 boxes..

Here the PIC enter image description here

Solution There were different steps taken to resolve this.

  1. The VM running DHCP/DC etc (2012 R2 Server) also had to run the NICs on Legacy adapters. Once I modified the virtual hardware of this VM, I was able to reach the ESXi from that VM. Note that I was still not able and currently not able to ping from the Hyper-V host to the ESXi and viceversa and I'm not in need to solve this. You might want to change the vSwitch to Private rather than Internal instead but in my case I'd like to have the host to communicate with my Windows VM.
  2. Enable promiscuous mode in the ESXi's VM's XML, right under . To do that you just need to add the string TRUE in the VM XML file in Hyper-V. In order to save that file you might need to stop the Hyper-V Virtual Machine Management service, save the file and start it again.
  3. Enable MAC Address Spoofing on the ESXi's NICs. This was originally done, prior me posting this question here, the problem is that during troubleshooting I modified the VM settings and forgot to write this step down. It was incredible when I found out, after re-starting the ESXi up, I was able to get 3 different vSwitches all reachable from their own networks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .