I often run VMware Workstation on an Ubuntu Linux box and load up some VMs inside it.
The default is to setup a network adapter for NAT, but this NEVER works, I never have any connectivity to the physical network in my guest OS until I change the network adapter type of the VM to Bridged.
However, when I setup ESXi 4.1 as a Bridged VM it can see the physical network, but bridged VMs inside it can't... I think if I got NAT to work it would let me get network connectivity from my guest OSes nested inside a guest OS that is a host... if that makes any sense to anyone at all.
I could really use some help figuring this out. I've been banging my head for weeks and have come up with nothing.
If you are unsure which IP addresses to use in case of NAT, I'd recommend you temporarily enable DHCP on the Windows 7 guest and then run "ipconfig /all" to see what it looks like. To setup the IP settings manually, make note of the settings and adjust the IP address to one outside of the NAT network's DHCP range.
André
Are you using DHCP or static addresses ?
Let's go with static, because it will be more defined. If I turn on NAT on VMware Workstaiton's Windows 7 VM, what should I be using? What should the gateway address be of the guest OS? Here is what I have setup now.
Gateway / Internet Router Local interface / DHCP Server |
---|
IP: 192.168.1.1/24 |
Linux Box, Single NIC, VMware Workstation |
---|
IP: 192.168.1.100/24 Gateway: 192.168.1.1 Internet Connectivity: YES |
Windows 7 Guest OS on Linux Box |
---|
IP: 192.168.1.105/24 Gateway: 192.168.1.1 Internet Connectivity: NO |
Welcome to the forums!
However, when I setup ESXi 4.1 as a Bridged VM it can see the physical network, but bridged VMs inside it can't... I think if I got NAT to work it would let me get network connectivity from my guest OSes nested inside a guest OS that is a host... if that makes any sense to anyone at all.
What leads you to that assumption? NAT does exactly that, it hides the guest from the outside world. You will have difficulties to start communication from the outside to the guest. To achieve that you must configure port forwarding. So as ong as teherÄs no special need for NAT I would stick to bridged vNICs.
However, you want to get NAT running with any kind of guest? Can you post screenshots of the single tabs you get when you run the virtual network editor?
AWo
If you are unsure which IP addresses to use in case of NAT, I'd recommend you temporarily enable DHCP on the Windows 7 guest and then run "ipconfig /all" to see what it looks like. To setup the IP settings manually, make note of the settings and adjust the IP address to one outside of the NAT network's DHCP range.
André
I agree, I thought Bridged vNICs would be better, but I explained my problem to a highly paid VCP and he said I should be running NAT and it would solve all my problems. So I thought I would try it, but, can't even get it to work with a single guest OS.
If you have a link about the port forwarding in VMware Workstation, that sounds exactly like what I need. But, let's stay on topic in the thread, it bugs me that I can't get NAT to work out of the box and there seem to be a ton of posts about it with no helpful solutions for my case.
This is the screenshot of the VNE, it's default, I didn't change anything. vmnet0 is for bridged, vmnet1 for host-only, and vmnet8 for NAT. I have tried custom in the VM vNIC settings and tried to set it to vmnet8 directly, and I've also tried deleting them all and creating my own vmnet... but these are the defaults, I've just installed it on a different PC.
Actually, I guess I hadn't tried that.. I was jumping in the deep-end and trying this with server OS's and things that needed a static IP... so I was leaving them with the same IP configuration that was working with a Bridged vNIC when I switched them to NAT. Then they couldn't go anywhere..
It looks like the VMware is hosting its own DHCP server for a NAT'd address range... giving them an entirely different network and gateway... duh... have thought about that... I guess I was just hung up on the idea that this works in bridged so it should work when I switch it to NAT and that DHCP wouldn't matter because the DHCP server would be giving it the same info I'm putting into it... I had no idea VMware Workstation would act as DHCP server to the guest OS in NAT.
What a simple solution... I tried all sorts of things like adding static routes... just use DHCP!
Of course, this does leave the other issue... the Guest OS's will be able to get out, but nobody will be able to get in... so I can't host any servers/services inside without somehow setting up port forwarding inside VMware Workstation to forward ports to a particular guest host.
VCP training is for ESX and ESXi - they usually dont know much about Workstation
you still use "automatic bridging" - you should configure vmnet0 first of all - assign the physical network interface you want to use for vmnet0
automatic bridging only works on some host with one nic only
Do you need to access the nested guests from the network!? If not, you could assign 2 virtual NICs to the ESXi VM, one set to Bridged (for the management network vSwitch) and on using NAT (for the Virtual Machine Network vSwitch).
André
Thanks, I am going to add more NICs, so I went ahead and changed vmnet0 to use eth0 for the bridge... just had defaults set to try to figure this thing out. Can't believe it ended up being so simple... I had seen the other networks for NAT in virtual network editor, and tried to assign static IPs for guest hosts on the NAT network, but guess I had the gateway wrong, it is .2 instead of .1... just never tried DHCP because I assumed it would result in my DHCP server giving it the same thing I give it in static... had no idea VMware would answer the DHCP request. Should have read more carefully in VNE, seems obvious now.
Yeah, preferrably I need to figure out how to access the guest OS's from the physical network...
So I have powerful computers, but they are not on the HCL and they need to run Linux as their base OS (can't be done inside a VM).
Because of that, I tried to load ESXi in a VM... ultimately I wanted to be able to use VMware View... that required needing Microsoft Active Directory, which needed at least one domain controller, plus a 64-bit Windows server for vCenter and another server for View. I tried to set those all up as VMs inside ESXi, but they had no connectivity to the physical network even though ESXi was setup as Bridged... NAT didn't work either because I tried to give them the wrong gateway to their NAT'd networks because the Virutal Network Editor doesn't tell me what the gateway is... and they all needed static addresses for their services.
Anyway, ultimately I set those servers up as VMs directly in workstation because they worked there, as long as they were bridged... but the View client computers inside ESXi still couldn't see the network... I think the VCP was right, setting ESXi to be NAT'd will fix their problem...
However, now I would like to move those servers inside ESXi too... and that actually should work... they'll all be on the same NAT'd network, so they should be able to communicate with each other just fine... But... what if I want to join a PC on the physical network to the active directory domain that is virtualized... the domain controllers are NAT'd inside ESXi... so it won't work unless I can port forward on teh VMware Workstation to those domain controllers inside the NAT.