VMware Cloud Community
remixedcat
Contributor
Contributor

Vmware ESXI within Hyper-v (server 2012) networking issue

I am trying to get esxi running within hyper-v and it won't recognize the virtual switch even though I got it setup properly and it works with any other VMs on this system.

http://i.imgur.com/4rCA3.png

Hyper-V-Virtual-Switch-Issue-421.PNG

I only have one NIC but it works fine with other VMs.

191 Replies
Datto
Expert
Expert

Hyper-V V3.0 runs fine (albeit a bit slowly) in a VM running on a physical ESXi 5.x with SLAT capability in the physical CPUs. You can even run x64 bit VMs on the VM that is running Hyper-V 3.0.

What you're trying to do is the opposite -- running ESXi inside a VM running on Hyper-V. I don't know of anyone who as that functional and useful.

Datto

Reply
0 Kudos
remixedcat
Contributor
Contributor

so nobody has correctly done this yet?? Smiley Sad

Reply
0 Kudos
Datto
Expert
Expert

VMware is years ahead of Microsoft when it comes to virtualization efforts. Running other hypervisors successfully as VMs running on physical ESXi (examples: ESXi as a VM that runs its own VMs, Hyper-V in a VM that runs its own VMs, XenServer in a VM that runs its own VMs, KVM in a VM that runs its own VMs) is something that is just one of the many advanced cabilities built into ESXi that the other hypervisors are trying to figure out.

As a sidenote -- If you're doing this for self-study in order to enhance your career path, you'd be much better off forgetting about Hyper-V for now and focusing your efforts and time on learning VSphere. Since 2006 the data I track every week indicate a 10x factor in the number of jobs available for people with VMware skills than there are with anything having to do with Microsoft virtualization.

If you're wanting to get ESXi running under Hyper-V and instending to get that to be useful (meaning, VMs running under the VM that runs ESXi) and doing it just for the technical challenge, good luck.

Datto

Reply
0 Kudos
admin
Immortal
Immortal

In the virtual hardware configuration of the ESXi VM, select 'legacy network adapter.'

Reply
0 Kudos
remixedcat
Contributor
Contributor

Legacy Netork Adapter--->no go Smiley Sad

I even had it configured to where the only adapter was the "Legacy Network Adapter" and that's a no-go as well. I even tried the VLAN thing and nothing Smiley Sad

Reply
0 Kudos
admin
Immortal
Immortal

Apparently, the network adapter emulated by Hyper-V is the DEC 21140, for which there is no ESXi driver.  However, you should be able to compile a compatible driver from 2.6 Linux kernel sources.  See http://www.vm-help.com/forum/viewtopic.php?f=24&t=3480 for some information on how to do that.

Reply
0 Kudos
remixedcat
Contributor
Contributor

Thank you very much. How do I got about loading that driver though?

admin
Immortal
Immortal

Reply
0 Kudos
remixedcat
Contributor
Contributor

Many thanks. Will do.

Reply
0 Kudos
remixedcat
Contributor
Contributor

I used the customizer tool and have tried a mix of around 12 files of various types like .vib,.tgz,.offline packages, etc and adding them to the customizer and I've had no luck... the results are mixed as well... some have gotten it working, some haven't. Smiley Sad

Reply
0 Kudos
admin
Immortal
Immortal

I took a closer look at this, and it appears that the Linux tulip driver is not an easy port, since it doesn't have ethtool support.  I still haven't given up, though.

Reply
0 Kudos
remixedcat
Contributor
Contributor

Thank you.

Reply
0 Kudos
admin
Immortal
Immortal

Another complication...the linux tulip driver doesn't appear to support zero-copy (although the device itself does).

Of course, even if we manage to circumvent all of these issues, I think there will be problems with nested guest networking, since you can't put the Hyper-V vSwitch into promiscuous mode.

But if there's still interest, I will continue to pursue it.

Reply
0 Kudos
remixedcat
Contributor
Contributor

wow this is more complicated then I thought! I hope we can still make this happen it would help a TON of people out!

Thank you very very much for your help so far! Smiley Wink

Reply
0 Kudos
admin
Immortal
Immortal

Okay.  Things seem to be working now, but due to the open source involvement, I don't feel comfortable with just providing the VIB.  So, in open source fashion, let me teach you how to fish.

1.Download VMware-esx-public-source-5.0.0-434156.tar.gz from https://my.vmware.com/web/vmware/details?downloadGroup=VSPHERE_50_OSS&productId=229, and extract it into a directory on a Linux system.  Let's say /tmp/esx.

2. Change directory to /tmp/esx and extract vmkdrivers-gpl.tgz.

3. Download the linux-2.6.24 sources and copy drivers/net/tulip to vmkdrivers/src_9/drivers/net/tulip

4. Make everything writable with chmod -R +w .

5. Download the diffs file attached to this post.

6. Apply the diffs with:  patch -p0 < diffs

7. Install all of the tools mentioned in build-vmkdrivers.sh and set the appropriate shell variables (e.g. CC, LD).

8. Execute the build script with:  sh build-vmkdrivers.sh

9. Download the net-tuli.tar file attached to this post.

10. mkdir -p usr/lib/vmware/vmkmod

11. Copy the tulip driver to the above directory with:  cp BLD/build/vmkdriver-tulip-CUR/release/vmkernel64/tulip usr/lib/vmware/vmkmod/tulip

12. Add the tulip driver to the tar file with: tar rf net-tuli.tar usr/lib/vmware/vmkmod/tulip

13. Copy net-tuli.tar to an ESXi system.

14. Convert net-tuli.tar to a vtar file with: vmtar -c net-tuli.tar -o net-tuli.vtar

15. Copy net-tuli.vtar back to a Linux system.

16. Download the descriptor.xml file attached to this post.

17. Get the sha1 checksum for net-tuli.vtar with: sha1sum net-tuli.vtar

18. Edit descriptor.xml, replacing SHA1SUM with the sha1sum obtained above.

19. Compress the archive with:  gzip -c < net-tuli.vtar > net-tuli

20. Get the sha256 checksum for net-tuli with: sha256sum net-tuli

21. Get the size of net-tuli with: ls -l net-tuli

22. Edit descriptor.xml, replacing SHA256SUM and SIZE with the sha256sum and size obtained above.

23. Create the vib file with: ar c tulip.vib descriptor.xml net-tuli

remixedcat
Contributor
Contributor

Wow! Thanks a lot and that's a lot to do! I will give this a try if I got the spare time to attempt it. I will let you know if I run into problems.

also what makes you uncomfortable about it?? don't worry if people would bash you or anything!

Reply
0 Kudos
admin
Immortal
Immortal

remixedcat wrote:


also what makes you uncomfortable about it?? don't worry if people would bash you or anything!

I don't want to run afoul of the GPL.  This way, I'm not distributing GPL'ed code in any form.

Reply
0 Kudos
Venray
Contributor
Contributor

Way to go!

Thanks, will you share the tulip.vib file with us please.

No problem if it doesn't work the way expected.

I'm not a gury with Linux, that's why. 🙂

Reply
0 Kudos
admin
Immortal
Immortal

I'm sure someone will be able to do it.  To distribute the VIB, I would have to pass this by our legal department, which could take months.

Reply
0 Kudos