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
emiljan

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
murmatron

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
kado897

Microsoft Community Contributor Award Recipient

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

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
emiljan

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
pparks1

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
b0zmeister

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
kado897

Microsoft Community Contributor Award Recipient

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

Windows XP 32bit
 
 

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

Linux CENTOS 7 / various Windows OS'es and servers
 
 

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 W7 Host that usually has nobody logged on to the W7 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




Similar help and support threads
Thread Forum
Virtualbox on windows7 host xp guest can not connect to the internet
hi all hope some one can help.. i have v-box running on win 7 in the vbox i have win xp i have it set on bridge connection i can ping the windows 7 side just fine but i can't ping 8.8.8.8 google and have no internet connection the internet on the host is fine like you guys can see there i am...
Virtualization
Laptop connecting to network but not internet
Have my modem connected to a switch and my desktop and laptop connected to the switch. The internet works flawlessly on my desktop with no problems at all. The laptop is connecting to the network but is not connecting to the internet. It tells me " 'Local Area Connection' not a valid ip...
Network & Sharing
VirtualBox Shared folder-Win 7 Host & Win XP Guest
Dear All, I am using Win 7 SP1 (Host OS). I have installed Oracle VM VirtualBox v4.1.2 where Win XP SP3 is the guest OS. Please let me know how do i share a folder from my host OS which is visible and accessible from the guest OS (Win XP) in VirtualBox? In VirtualBox even though I have...
Virtualization
bridged connection between virtualbox vm and windows host
I have a problem at bridged connection between virtualbox vm and windows host. 1. host windows 7 x64. 192.168.0.2 2. virtualbox guest scientific linux 6.2 x86 192.168.0.5 bridged adapter
Network & Sharing
VirtualBox vs VMWare Player 64B Host / 34B Guest using Paragon
7 Home Premium 64 Bit host, I've been using VMlite for a 34 Bit XP Pro virtual machine. Most apps run fine, but some aren't as clean. I'm thinking of switching to VMWare Player or VirtualBox and using Paragon go virtual to create a new VM. Anyone go down this path already? Any...
Virtualization
PC keeps Identifying network and not connecting to the internet, HELP!
Hi, I recently built a computer myself and decided to connect it to our internet, it connects to the wireless router but it keeps saying identifying the network and has a X between the network and internet. I tryed both wireless and wired. Do I have to change any setting of the PC or router?...
Network & Sharing


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 12:16.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App