Fast local connection from a VM (via the Host) to a Server that is on the same physical network with the Host, in order to apply the WSUS Offline updates.
Setup
VM: Windows 7 x64.
- NIC 1: 192.168.100.110, HostOnly to connect to the Host. DHCP.
- NIC 2: 192.168.50.110, Internal, reserved for when other VMs are running. DHCP.
- NIC 3: 10.0.0.111, Bridged to Host's WiFi for Internet. DHCP.
- NIC 4: 10.0.5.15, NAT for Internet, when Bridged doesn't work [1]. DHCP.
- NIC 1: 10.0.0.101, WiFi to router for Internet. 54 Mbps. DHCP.
- NIC 2: 169.254.38.231, wired directly to Server, 1 Gbps. Link-local (APIPA).
- NIC 1: 10.0.0.110, wired to router for Internet. DHCP.
- NIC 2: 169.254.69.41, wired directly to the Host, 1 Gbps. Link-local (APIPA).
And for those of you who are fond of ASCII art, here's what it looks like [2]:
- - Missing direct link - - ___|___ ________ ____|___ | |___1___|____. | | | | VM |___2___| Host |_______| Server | | |___4___|____ | Wired | | |_______| |____|___| APIPA |________| | | | |_______3________|WiFi |Wired __|________________|__ | | | Router | |______________________| _|__ .~-(` `)~. ( Internet `) ~-. ___ .-~~` 1: Host-only, 2: Internal, 3: Bridged, 4: NAT
Problem 1: I wanted to connect the VM to the Server, in order to apply the WSUS Offline updates (more on that on a later how-to). If I used the Host's Bridged option, I would get slow speeds, because the adapter was bridged to the WiFi, therefore limiting it's speeds to a maximum of 54 Mbps.
Solution 1: I realized that instead of bridging the VM to my WiFi, I could (probably) bridge it to the wired local-link one. And it worked! I got a local-link address on my VM, and I was able to ping the Server, the Host and the VM from anywhere to anywhere. Just for completion, the self-assigned local-link addresses were:
- 169.254.115.194 : VM
- 169.254.38.231 : Host
- 169.254.69.41 : Server
Solution 2: The network was set as "Unidentified network", both on the Server and on the VM, due to the lack of a dedicated Gateway (I could definitely say something here about Microsoft, but it wouldn't be nice). There had to be some changes in the "Network and Sharing Center" for "Public" networks:
- Turn on network discovery (Server and VM).
- Turn on file and printer sharing (Server).
- Turn on sharing in the Public folders (Server).
- Turn off password protected sharing (Server).
- When asked for Username/Password, simply enter "Guest" as the Username, no password (VM).
[1] When I go to the office, bridging through that specific WiFi Router does not work with my MBP. At home my WiFi Router works with VirtualBox's bridge mode with no problems.
[2] Yes, I had some free time to kill with my morning coffee