I want to install Exchange 2010 on a Windows Server 2008 R2 in my virtual box v4 running on my laptop (running Windows 7). Additionally I have a Windows Phone 7 on which I want to access the Exchange installation in order to sync contacts and calendar (no email); later adding maybe Sharepoint. It should be an experimental environment.
I have read a couple of articles on the web concerning virtualbox's networking possibilities (bridging etc.) but I didn't succeed to set it up in order that network clients which are in my 192.168.1.X Subnet (like the laptop and especially the Windows Phone) can access the virtual Server installation.
My main problem is that I am overwhelmed with the possibilities to adjust settings.
I don't think I can use NAT and portforwarding due to the wish to access Exchange. It were probably better to make the Virtual Server accessible to all LAN clients in general. Moreover I want to access the server directly from the phone and not through the Laptop. (Don't know whether this is important for this issue, but Exchange requires a domain and in the future it should also be possible to access the Exchange from outside the LAN – by dyndns or something similar.)
Here are some of my questions (brainstorming):
- In VirtualBox: File -> Global Settings -> Network -> Host-only networks -> Virtual Box Host-Only Adapter: Needed at all? If so, which IP? Activate DHCP? If so, which DHCP IP? = IP of my router? Which range? = The routers DHCP IP range?
- In my network adapter settings on my Laptop: VirtualBox Host-Only Networt -> use DHCP? If not which IP? use automatic DNS? If not, which DNS? (Are these the same settings like in the point mentioned above?)
- In my network adapter settings on my Laptop: Need to bridge for instance my WiFi and the VirtualBox Host-Only Network adapter? Any special adjustments needed to be applied to this Bridge? IP probably to be within 19.168.1.X.
- In VirtualBox: In the configuration of the virtual server machine -> Network -> Adapter 1 -> Connected To: Host-only or Bridge?
- In the virtual server network adapter settings (on Windows Server): Which IP? Use DHCP? DNS?
Which procedure would you recommend? I feel lost in the middle of nowhere…
Thanks in advance for your valuable hints!
Best Answer
Quick answer: Bridge mode, no adjustments necessary. Existing DHCP server (probably on your router) will assign addresses to the virtual as if it was another physical machine. Accessible as any physical machine would be.
You can have 8 total virtual networks, mix and match as needed. Unlimited number of clients and/or host can access any or all of these networks. (if allowed by virtual type)
RTFM, you need to understand what each networking type is and how it's used. http://www.virtualbox.org/manual/ch06.html#networkingmodes Generally things can be kept "simple" but with VDE networks and creativity you can simulate very complex networks.
VDE - virtual switch - virtualsquare.org
Internal - No host access and no direct internet access
Host-only - Host access but no direct Internet access
NAT - Host access, routed Internet access through host, uses host's firewall
Bridged - direct access externally, host access is "external", promiscuous packets could be captured between host and it's virtual(s) if plugged into a dumb switch/hub. Direct IP to IP/Host to virtual packets don't go out on the wire.
*Bridged, Internal and Host-only are often used for laptop security
We run all our laptops this way. You can even VPN through the bridged virtual to attach two or more laptop's host only virtual nets together without either nets being allowed to ever access the Internet (or be remotely accessible). Great for private shared workspace collaboration while traveling/off-site/coffee-house/hotel/etc..
Laptops (and some desktops with wireless or dual NICs) will probably be setup with two (or more) NICs bridged. Virtual can easily be switched (even while running) between the hardwire(s) and wireless bridges.
A typical setup; Laptop with built-in NIC and wireless plus docking station NIC using 8 virtual networks.
1 host-only for internal lan - secure surfing, credit card, banking
Host has no IP assigned. Never assign an IP to the physical NIC
Hopefully I didn't confuse with the common name of Internal for Internal virtual network type and internal lan which is designating a host-only network behind the virtual firewall. (DMZ/external/internal router designations)
This is just the basics, most of which is already over-kill for most use cases. Using VDE and multiple physical NICs you can do extremely complex scenarios on commodity hardware. Some of the above is "standard use". If you're familiar with virtualization you'll probably see some of the possible exceptions. Non-standard uses and custom programming using the SDK can produce edge cases where the above rules no longer apply.