Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: VirtualBox Host-Only Network Not connecting to the Internet


20 Mar 2012   #1

Windows 7 Home Premium 64bit
 
 
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.

http://i.imgur.com/wGmtY.jpg


My System SpecsSystem Spec
.

21 Mar 2012   #2

Windows 7 Pro x86
 
 

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 System SpecsSystem Spec
22 Mar 2012   #3

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

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 System SpecsSystem Spec
.


22 Mar 2012   #4

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by emiljan View Post
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 System SpecsSystem Spec
23 Mar 2012   #5

Windows 7 Home Premium 64bit
 
 

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 System SpecsSystem Spec
23 Mar 2012   #6

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
10 Aug 2013   #7

Windows XP 32bit
 
 
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 System SpecsSystem Spec
10 Aug 2013   #8

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Hi b0zmeister and welcome to seven forums. Thanks for the info. It may be useful for some of us.
My System SpecsSystem Spec
10 Aug 2013   #9

Windows XP 32bit
 
 

No worries - :@)
My System SpecsSystem Spec
12 Aug 2013   #10

W7 X-64 W8.1 X-64 Opensuse 13.1 W2003 Server
 
 

Quote   Quote: Originally Posted by pparks1 View Post
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 Windows 7 Host that usually has nobody logged on to the Windows 7 system. The W2K3 server supports multi-user operation of course.


Cheers
jimbo
My System SpecsSystem Spec
Reply

 VirtualBox Host-Only Network Not connecting to the Internet




Thread Tools




Our Sites

Site Links

About Us

Find 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 10:28 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33