vmware player - vm has no network connection, static host ip

35,713

To share the host's network access (including internet) to a virtual machine you can use any of the 3 adapter types, but NAT is the simplest.

enter image description here

Remember you can attach, and unattach virtul hardware so make sure to check the connected, and connected at startup boxes for your virtual network adapter. If you don't know which to use, start with NAT, and see if it meets your needs.

VMware Player uses 3 virtual switches by default, but more can be created. For Windows hosts the max number of virtual switches is 20, on Linux hosts the max is 255. The number of virtual adapters that can be connected to any given switch is 32 on Linux systems; there is no limit on Windows systems. VMnet0 is for NAT connections, VMnet8 is for bridged connections, and VMnet1 is for host-only connections.

NAT:

enter image description here

NAT connections mean that your VM will get a unique IP on the virtual network, but not on your host network. For NAT connections "vmnat.exe" is used so make sure it's not blocked by your host's firewall. NAT connections are good for providing the guest with internet access, and for providing you host with access to webservers you've setup in a virtual machine that you only intend to access using that host.

Bridged:

enter image description here

Bridged connections mean that your VM will get a unique IP on the host network. Remember though, this computer's connection will pass through the host machine so your host's firewall must be setup not to block the VM's connection. I believe VMware Player uses "vmnetbridge.sys" for bridged connections. Bridged connections are useful if you need to provide internet to your virtual machine, or host virtual webservers that you want to access from any computer on the host network.

Host Only:

enter image description here

A host only connection is intended to provide only a private connection between the host, and the guest. However you can configure your host to share internet access the same way you would if you'd connected 2 real computers with a lan cable. Remember host only will use vmnet1 switch by default, but you can use custom if you'd like to use a different virtual switch. You can find instructions about I.C.S. (Internet Connection Sharing) here: http://windows.microsoft.com/en-ca/windows/using-internet-connection-sharing#1TC=windows-7. I can't help you with that as I have rarely been successful sharing internet between computers (real or virtual). If you're wondering what a LAN segment is, it's just when a host only virtual adapter is shared between multiple virtual machines. A host only network connection is useful when you don't need internet in the guest, or when you want more control over providing internet access to the guest. It's also great for virtual machines you are using a webservers that you intend to access only from the host.

Share:
35,713

Related videos on Youtube

jurchiks
Author by

jurchiks

Updated on September 18, 2022

Comments

  • jurchiks
    jurchiks over 1 year

    Host: Windows 7 x64, static IP.
    VM: VMWare Player Windows XP/IE8 from http://modern.ie.

    A bridged connection doesn't work, and, as far as I understand, it is a no-go anyway, because it tries to get a separate IP address for the VM, but I have only one static IP address. NAT doesn't work either. And by doesn't work I mean it says network cable is unplugged in the VM.

    Perhaps I have to change something in the VM aside from the VMWare Player settings? I have tried replicating my host's IP settings on the guest OS, but it didn't help.

    The most stupid thing is that I had it configured and working, but I don't remember how, because it was a while ago. The VM expired and I couldn't access the console to reactivate it, so I deleted it and installed a fresh one, but forgot to check the settings beforehand.

    • Robin Hood
      Robin Hood over 9 years
      Are you trying to create a network that will provide internet access to the vm, or just a host-to-vm connection? Generally NAT is what people want to use, and if your virtual cable say's its unplugged that just means you need to tick the connection boxes in the vm's settings.
    • jurchiks
      jurchiks over 9 years
      I don't need to connect to the VM, I need the opposite - to access websites on my host OS and on the internet from the VM. What connection boxes? There are no connection boxes in the VM settings for NAT, only for bridged.
    • jurchiks
      jurchiks over 9 years
      @RobinHood - anything?
    • Robin Hood
      Robin Hood over 9 years
      Connection boxes: postimg.org/image/ehs7mq2c3 .If the machine is on both boxes should be checked. If the machine is off the top box will be grayed out.
    • jurchiks
      jurchiks over 9 years
      @RobinHood - both of those were checked by default, IIRC. In any case, both of them are checked and they don't really change anything for me.
  • jurchiks
    jurchiks over 9 years
    I'll be damn, started the VM up today and it just worked... Using NAT, no special settings. I have no idea why, I hadn't touched the VM since I wrote the question. Sorry about that, I know it's stupid. But thanks a lot for trying!
  • Brian J
    Brian J over 8 years
    After switching through the radio buttons a dozen times, all I needed was your first circled image that said "Connected".....reading is hard.
  • Vomit IT - Chunky Mess Style
    Vomit IT - Chunky Mess Style over 6 years
    Did you mean to write an answer? Read over "Why do I need 50 reputation to comment" to ensure you understand how you can start commenting.