Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

Hi All,

My setup is
Host : Windows 7 with Non fixed IP obtained from ISP. For example 192.168.1.2
VM =SBS 2011 (2008 Server R2) with fixed IP of 10.0.2.5.

I can't ping between the machines but I do have internet access on both.
How can I get ping or telnet work between the host and the VM ?
What network configuration should I use in the network setting of the VM ?
Do I need a router to bridge between the 2 different subnets ?
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by noteirak »

Bridged mode is what you're looking for, instead of NAT.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

I set to bridge mode but it doesn't work. I noticed that there are 3 adapters to choose in bridge mode and I tried each :
1. Microsoft Wifi miniport adapter
2. The ethernet card
3. The wireless card (actual one connected to internet)

As for IP settings I set as seen in the attached image. I thought that if I would set the virtual adapter to the same IP address of the VM it would be bridged but beside being able to ping this virtual adapter there is no bridging at all. What are the correct setting considering that these 2 IP settings are a fact ? :

Host : Windows 7 with Non fixed IP obtained from ISP. In my case 192.168.1.2
VM =SBS 2011 (2008 Server R2) with fixed IP of 10.0.2.5.
Attachments
Untitled2.jpg
Untitled2.jpg (125.69 KiB) Viewed 3345 times
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by BillG »

I think you need to do bit more reading on networking and Active Directory before you go any further.

If you are really running SBS2011 you must make it a domain controller or it will not work. You need to think about how you are going to set up your domain network. A domain controller should have a static IP address in its own IP subnet, not an address from DHCP. It is not a good idea to make the host Win 7 machine a domain member.
Bill
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

Bill,

This is not real IT environment but rather a setup on a standalone Laptop built to demo Outlook plugins.
The Win 7 is just a platform that carries the 2008 R2 VM. Win 7 handles exotic drivers much better than 2008 R2 VM. That's why I used it as a host for the 2008 Server R2
The 2008 R2 VM carries Exchange 2010 with Domain controller and some Exchange clients. All work properly.

For test purposes I now need to have an email account running on the Win 7 host and this is why I started this post.
Correct me if I'm wrong but I believe that before I start messing with domain controller I need to resolve the ip layer problem and the 2 network environments need to be able to ping each other...
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by BillG »

So what network is the server running on? What IP range is it using? (Surely not NAT)!
Bill
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

Host : Windows 7 with Non fixed IP obtained from ISP. For example 192.168.X.X
VM =SBS 2011 (2008 Server R2) with fixed IP of 10.0.2.5.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by BillG »

If the guest has a 10.0.2.5 IP address you still have it set to the IP subnet used by NAT. That is no use to you and is a bad choice for a DC.

Is this laptop a standalone machine not connected to a local network? Does it connect directly to the Internet (and if so, how)? If so you cannot use bridged. That requires the host to be on a local network (preferably one with a DHCP server). Your best bet is probably to use the Host Only network. Let the server get its IP from host only DHCP then configure it manually with the config it receives (as you obviously did for the config it got from NAT). Set the host only interface on the host to use the vm for DNS (from network and sharing centre on the host). The host should then see the Exchange server through the host only network. No physical NICs are involved.
Bill
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

Great Bill. Problem resolved ! I managed to ping the VM using the attached config.
I'm also able to ping the url of my email server .
Thanks !
Attachments
Host to vm connection.jpg
Host to vm connection.jpg (125.82 KiB) Viewed 3299 times
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

After applying the setting in my previous post I was able to telnet from Host to VM.
However...now there are problems inside the VM:
I'm not able to connect to exchange server even within the VM.
Can this be related to the phenomena below ? ...

The phenomena...
In contrast to the 10.0.2.7 IP I get when running ipconfig command (see in the text below),
in "virtualbox host-only network properties" of IPV4 I see the 192.168.56.1 IP, shown in the image below.
Where does this IP come from ? I change it back to 10.0.2.7 and it keep reverting to 192.168.56.1 .
Even when I delete it from advanced menu it comes back. How come ?


Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 10.0.2.6
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2

Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 10.0.2.7
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Attachments
192168561.jpg
192168561.jpg (64.07 KiB) Viewed 3293 times
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by noteirak »

You're totally mixing up networking concepts here.

Host-Only is exactly what it means : Host ONLY. It will set the interface to use another subnet (an isolated LAN) that has no connection with your regular LAN.
Host-Only is like having a 2nd NIC in your computer directly connect to another computer (let's call it B) with no other connection to anything. Since B has only a connection to A, it can't talk to your LAN.
Why can't it? Because you need a specific network device for two distinct LANs to talk to each other : a router. A regular computer will NOT route, so there is no way to talk with the rest of your LAN.

The fact the interface always reverts back to 192.168.56.1 is because it is controller by Virtualbox, not by the OS. It doesn't matter if you configure it in the OS, Virtualbox will always reapply its settings.
But that is not important here, since you SHOUL NOT be changing them unless you know what you're doing.

Given your host OS, if you need your VM to talk to your LAN, use Bridged. But since you're using Wifi, it will cause issues (due to the nature of Wifi and how Wifi hardware is made) and won't connect.
Plug a cable from your computer to your ISP router, set the VM network mode to Bridge and select your ethernet card. Your VM should get an IP. If it doesn't, then your ISP router has an issue with the DHCP.
If it does, you can always set an IP yourself in the IP range of your provider within the VM, given it's not in use.

After that, it should all work.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

noteirak,

Thanks for replying.
I tried bridged mode with Ethernet connection and I got : No internet in VM; No connection to Exchange in VM; no connectivity between host and VM; Host network is fine.
When I set NAT mode with Ethernet connection I get : Internet in VM; Connection to Exchange in VM; no connectivity between host and VM; Host network is fine.
When using Bridge mode things actually got worse ....
EnglishBulldog
Posts: 10
Joined: 15. Sep 2013, 19:52

Re: Host : Windows 7 ; VM =SBS 2011 (2008 Server R2)

Post by EnglishBulldog »

Now it works ...

The following fixed the problem:
1. Setting to bridge mode.
2. Changing host to fixed IP in the same subnet of the VM fixed IP.
3. Connecting to Ethernet as opposed to wireless.
4. Restarting the VM.

Thank you all !
Post Reply