VirtualBox Host-Only Network Not connecting to the Internet


  1. Posts : 3
    Windows 7 Home Premium 64bit
       #1

    VirtualBox Host-Only Network Not connecting to the Internet


    Hey guys,

    I'm having a little trouble setting up two virtual machines connecting to the internet. I've setup a Windows Server 2008 R2, and Windows 7 virtual machine with host-only networking on their own subnet.

    I'm having issues with getting them to connect to the outside network for internet access. Both machines are on their own subnet 192.168.2.0/24 and the host machine on subnet 192.168.1.0/24.

    Both vm's are on Internal Network Mode and the Windows Server 2008 machine has a static ip of 192.168.2.2, but no default gateway or dns because i have no idea what to put in there. Do i put in the IP of the VirtualBox Host-only adapter as the default gateway?

    This is where im having trouble with. I have DHCP setup on the Server VM and the Windows 7 VM can get an ip from the Server but neither can communicate out to the internet.

    I'm lost and i need your help to set this up. I have included a network diagram to for clarity.

    https://i.imgur.com/wGmtY.jpg
      My Computer


  2. Posts : 44
    Windows 7 Pro x86
       #2

    The behaviour you are experiencing is due to the fact that there is no routing happening between the VBox HO adapter and the physical NIC that is connected to the internet. That is the nature of host-only networking and the routing will not happen by accident.

    You can establish routing with your current configuration by using Internet Connection Sharing to share your real network adapter to the HO adapter, but the ICS default settings will mean that your VM static IPs will be wrong. Changing the default ICS settings requires editing the registry and instructions for that can easily be found elsewhere.

    > Do i put in the IP of the VirtualBox Host-only adapter as the default gateway?

    Yes, but it won't achieve anything until such times as there is a route from the HO adapter.

    To be honest you'd probably be better off using NAT or Bridged networking.
      My Computer


  3. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #3

    There is quite a good description of what each type of networking does in the VirtualBox Help->help Contents. Chapter 6 is what you want.
      My Computer


  4. Posts : 7,878
    Windows 7 Ultimate x64
       #4

    emiljan said:
    I'm having a little trouble setting up two virtual machines connecting to the internet. I've setup a Windows Server 2008 R2, and Windows 7 virtual machine with host-only networking on their own subnet.
    The networking is host only, meaning that the VM's will ONLY be able to talk to each other. They won't be able to talk to the Internet. Sounds like you really wanted bridged or NAT instead of Host only.
      My Computer


  5. Posts : 3
    Windows 7 Home Premium 64bit
    Thread Starter
       #5

    Thank You for the replies. But i decided to use VmWare Workstation instead because it supports multiple subnets and it seems to run much better than VirtualBox did.
      My Computer


  6. Posts : 7,878
    Windows 7 Ultimate x64
       #6

    Well, I would expect VMWare Workstation to run better and offer more benefits, as it's a $200 application and VirtualBox is free. Honestly, I really like VMWare Workstation 8. I'm the VM guy at work, and I just recently purchased VMWare Workstation 8 and am happy with my decision. Helps me to more easily build more complex labs and try some tricky stuff.
      My Computer


  7. Posts : 2
    Windows XP 32bit
       #7

    Getting VirtualBox Host Only guests to the internet the 3 minute way !


    Yeah I had this problem it was a total pain! But I solved it by simply installing Squid Cache Proxy server on my physical PC, and that way - my host-only internet virtualbox PCs could connect to the internet !

    I did a quick 3 minute guide here - for anyone who want's to how it works !
    Allowing ‘Host Only’ VirtualBox Guest to connect to the Internet | b0zmeister Windows, VirtualBox and Server Applications Tech Support
      My Computer


  8. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #8

    Hi b0zmeister and welcome to seven forums. Thanks for the info. It may be useful for some of us.
      My Computer


  9. Posts : 2
    Windows XP 32bit
       #9

    No worries - :@):)
      My Computer


  10. Posts : 5,941
    Linux CENTOS 7 / various Windows OS'es and servers
       #10

    pparks1 said:
    Well, I would expect VMWare Workstation to run better and offer more benefits, as it's a $200 application and VirtualBox is free. Honestly, I really like VMWare Workstation 8. I'm the VM guy at work, and I just recently purchased VMWare Workstation 8 and am happy with my decision. Helps me to more easily build more complex labs and try some tricky stuff.

    Hi there
    VMware workstation also has a HOST ONLY networking option -- this works just like it does in VIRTUAL BOX. As others have said choose NAT or BRIDGED if you want the VM to have its own access to the internet.

    (My preference too -- VMware -- although VMware player is Free I got a copy of VMware WORKSTATION from work. What I particularly like is that the VM's can run in the background which means nobody even has to be logged on to the host and they can have accounts on the VM without having a HOST account. -- Rather like a "Server".

    In fact I run a W2K3 VM server like this on a W7 Host that usually has nobody logged on to the W7 system. The W2K3 server supports multi-user operation of course.


    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:47.
Find Us