Whenever I’m on the road I rely heavily on the broadband card built into my Dell D630 laptop for connectivity at client sites, airports, train stations and hotels. There have been a number of occasions when I’ve had to update a VM or create a new one on-the-fly. One of the biggest problems I’ve encountered is how to update the VM’s OS to the latest Service Pack or KB since Hyper-V doesn’t recognize wireless devices as network cards. Therefore I can’t simply add a Network Adapter bound to my broadband card and update the VM.
I initially tried to create a Network Bridge between my internal broadband card and the Hyper-V virtual switch but Windows Server 2008 won’t let me bridge those two connections. I think it is because the virtual switch is classified as LAN or High-Speed Internet and the broadband card is classified as a Dial-up connection, but I haven’t found any confirmation to that effect.
My next thought was to follow a blog post by Ben Armstrong on connecting Wireless networks to your VMs using Internet Connection Sharing. I’ve taken those steps and modified them to work with the Broadband card. This post will be very close to his only with more pictures. Here are the steps…
1. Prepare the network connections
You need to have a virtual network device available for the Broadband card to share with. I’ve found that it is best to share with either a brand-new Internal Network created solely for this purpose or with an existing Virtual Network that isn’t being used at the same time as sharing.
In my case, I rarely have the Broadband card active when I’m using a physical network cable connection so I’m going to use the Broadcom NetXtreme 57xx Gigabit connection that was configured against my physical NIC when I installed Hyper-V.
Here’s what that looks like on my machine. The Internal Network that I created shows up in Network Connections as Local area Connection 4 and the Broadcom NetXtreme card is showing up as Virtual Switch. (Note: I changed the name of the Broadcom connection to Virtual Switch after installing Hyper-V to differentiate it from the Physical NIC it is bound to. Yours will not be called Virtual Switch or Physical NIC.)
2. Configure the Broadband card for Sharing
The next step is to configure your broadband card to share it’s connection with the virtuals. The steps I show here are for the Dell Wireless 5270 card for VZW Mobile. If you use this card with some other carrier or a different card your screens may differ from the ones shown here.
First off we need to get to the Properties window for the broadband connection. Right-click on the connection and select Properties.
This will bring up the VZAccess dialog letting you know that you really shouldn’t be playing around with this stuff unless you know what you are doing. Since we really know that this dialog is here to minimize the costs incurred by Verizon’s Help Desk for screwed-up configurations, just go ahead and click the Advanced… button.
This will bring up the actual Properties dialog. we need to click on the Sharing tab to get to the stuff we really want to play with. Now you need to click on the first check-box entitled Allow other network users to connect through this computer’s Internet connection.
As soon as you check this, the dialog below will appear letting you know that they can’t save the username and password for use by all users. This dialog can be safely ignored since we are going to be logged-on whenever we use the VMs. Click Ok.
The next thing to select a connection from the Home networking connection list. You want to select the connection that you identified at the start of this process. In my case, I’m selecting the Virtual Switch connection. The remaining checkboxes on this tab should be unchecked. Click Ok to continue.
3. Verify the settings
4. Connect to the Internet using the Broadband card
Fire up your broadband card and connect to your ISP.
Once connected, bring up a Command Prompt and verify your connectivity by running an IPConfig command. You should see the adapter that you selected has an IP Address of 192.168.0.1 which is the default for Internet connection Sharing. If I was configured incorrectly and my laptop wasn’t connected to a network cable I would see a 169.254.x.x address because the connection couldn’t find a DHCP server to provide an address.
5. Configure the Virtual Machine
Open up the Settings window for the virtual machine and select the Add Hardware entry in the current settings list. The right-hand pane will change to the Add Hardware settings. Next, select Network Adapter and click the Add button. This will change the right-hand pane to Network Adapter settings.
Notice that the current settings list now contains a new Network Adapter whose status is Not Connected. In the Network Adapter settings pane select your shared virtual adapter from the Network drop-down. Click the Ok button to finish.
6. Verify connection on the Virtual Machine
You can verify the connection by starting the virtual machine and logging into it. Once logged-in, bring up a Command Prompt window and run an IPConfig command. You should see that one of your connections should have an IP Address in the 192.168.0.x range and the DNS suffix should be mshome.net.
The next step is to verify connectivity. You can do this by running a Ping command against your favorite server on the Internet. I use ftp.apple.com because it is one of the few server that I know will reply to a ping (Most don’t for security reasons). Feel free to use any server that you know is external to your network and will reply.
That’s it. You can now open up a web browser and browser the web or run Windows Update to keep your VM OS’ secure and up-to-date.
“Consider these points when deciding whether to enable ICS.
WARNING #1: When you enable ICS, the network adapter connected to the local area network is assigned a static IP address of 192.168.0.1. The client computers are assigned other IP addresses in the 192.168.0.x range. These addresses may not be compatible with an existing network
WARNING #2: Don’t enable ICS if any computer in your network is configured as a domain controller, DHCP server, or DNS server. Don’t enable it if another computer is running ICS or Network Address Translation (NAT).
WARNING #3: To enable ICS, you must be logged on as a user that is a member of the Administrators group.
WARNING #4: If you establish a Virtual Private Networking (VPN) connection while sharing a different connection, the client computers won’t be able to access the Internet until the VPN connection is ended.”