Friday, March 13, 2009

VMWare Player Networking on Windows 7 Host

After having trouble getting any VMWare Virtual Machines to have internet access when running in VMWare player 2.51 with Windows 7 Beta as the host system I resolved the get the problem solved today. I ended up finding all of the information I needed spread around on multiple sites throughout the web. So if you are having trouble hopefully this can help.

Here are the issues I had:
  1. After installation a user account _vmware_user is shown on the Windows 7 Welcome Screen

  2. Virtual Machines can ping out to the internet without a problem, but when trying to load webpages they fail to load.

  3. After installation Windows Firewall defaults to Public Network settings.
Here is how I took care of these issues
  1. This solution was found on another blog (http://blog.stealthpuppy.com/windows/hiding-the-vmware_user-account-in-windows-7)

  2. This problem involved a little bit more digging and combing pieces found on multiple sites. It seems that some people do not have this problem but others do. If you are one of these people, and your problem is similar to the issue I described above this worked for me.


    Step 1:

    Follow the procedure below which is outlined here. We are going to setup a virtual network adapter to use Windows 7 ICS to get its internet connection. There is another procedure outlined in the comments on this page which sets up the virtual adapter to get its address from our local network, but this did not work for me and resulted again in being able to ping internet addresses, but not load them. Also I tweaked the procedure a bit to make it a bit easier.

    1. Start vmnetcfg.exe as administrator. This executable is located in \Program Files\VMware\VMware Player.

    2. Goto Host Virtual Adapters and remove all VMNet instances (VMNet1 and VMNet8 typically).

    3. Click Apply.

    4. Add and Assign it the new adapter to VMnet1.

    5. Select the Host Virtual Networking tab.

    6. Click the > next to VMnet1, choose Subnet, and change the IP addresses and Subnet mask to the ICS network (192.168.0.0 / 255.255.255.0). Click OK and then Apply

    7. Click the > next to VMnet1, choose DHCP, and make the Start IP address and End IP Address are in the correct network. Mine defaulted to 192.168.0.128 and 192.168.0.254 respectively. If you had to change them click OK and then Apply. Otherwise go to the next step.

    8. Click the > next to VMnet1, choose NAT, and change the Default Gateway Address to the ICS Network default gateway (192.168.0.1). Click OK and then Apply.

    9. You can now close the Virtual Network Editor program.

    Step 2: Now we need to enable ICS in Windows 7.

    10. Open up the Network and Sharing Center

    11. Left click on the adapter you are using to connect to the web a. If you are using a wired connection this will most likely be Local Area Connection 1 and if you are using Wireless is will be Wireless Network Connection. This will open the Network Connection Status window.

    12. Click Properties

    13. Select the Sharing tab.

    14. Check the box "Allow other network users to connect through this computers internet connection."

    15. In the Home Networking Connection Box choose "VMware Network Adapter VMnet1".

    16. Click OK.

    17. Click Close.

    Now we are almost there, but we still have one configuration problem. Windows Networking thinks that the Virtual Network Adapter is on a Public Network, which causes Windows Firewall to default to Public Network settings, which disables ICS. You have two options now. One will fix the issue till your next reboot, then other is a more permenant solution.

    Option #1: Tell Windows the Virtual Network is Private

    1. You should still be looking at the Network and Sharing Center, if not, open it.

    2. Click the Unidentified Network and change its setting to Home or Work which will make it a Private network.

    3. That's it, open up VMWare Player, Click Devices, choose Network Adapter, and Host-only. Your VM should now be able to connect to the internet.

    4. The only problem with this solution is next time you restart Windows you will need to go back into the Network and Sharing Center and reclassify the Unidentified Network as Private again. Or check out Option #2.

    Option #2: Classify Virtual Network Adapter as an Endpoint Device
    (Also the solution to Issue #3)

    1. Just follow the procedure outlined here. (http://www.nivot.org/2008/09/05/VMWareVMNETAdaptersTriggeringPublicProfileForWindowsFirewall.aspx)

    NOTE: In order to execute a PowerShell script you will need to enable PowerShell scripts. This involves a registry edit as outlined here. (http://computerperformance.co.uk/powershell/powershell_cmdlet.htm)

    2. Thats it, open up VMWare Player, Click Devices, choose Network Adapter, and Host-only. Your VM should now be able to connect to the internet.
Well that is it for now. Hopefully this helps a few of you who are still having trouble. This solution seems to be working great for me.

7 comments:

  1. I found that to make it work, i additionally have to specify the ip, subnet plus gateway in the wmware network adaptors tcp ip4 protocol.
    IP: 192.168.0.1
    Subnet: 255.255.255.0
    Default Gateway: 192.168.0.1

    First when clicking ok on this, i got the popup box to specify the internet-location.

    Maybe this is because i use Windows 7 RC 7100 and not the beta.

    ReplyDelete
  2. Interesting and important information. It is really beneficial for us. Thanks Windows Network Setup

    ReplyDelete
  3. Thanks for sharing this post.Great windows Player Networking.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Interesting post. Ill be sticking around to hear more from you guys. Thanks! Carpet Cleaning adelaide

    ReplyDelete
  7. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/vmware-training-pune-online/

    ReplyDelete