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
Solution
There were different steps taken to resolve this.
- 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.
- 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.
- 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.