Earlier this year, I wrote a post about creating a HyperV laptop to run an isolated Lync instance on using Windows Server 2008 R2. Now that Windows 8 is out though, I wanted to do the same thing for my main development machine, since we finally have a full on HyperV instance on the desktop OS. This turned out to present some different challenges than the server based laptop, not so much with the drivers, but with networking.
In HyperV, you now create virtual switches instead of just network connections. Because my laptop was domain joined at the office, I didn’t want to put a new DC on that network, so I set up an internal network for the DC, Lync, Exchange, and terminal servers. Then I wanted at least one server (the terminal server image that had Visual Studio and the UCMA 4 SDK preview) to be accessible via remote desktop for audio remoting, and also to be able to access the internet. This seemed like a simple enough task-right click the HyperV node, select the virtual switch manager, and create an External switch that bound to my physical NIC (note-make sure you chose the correct adapter-wired or wireless). I checked the box to allow the management OS to share the adapter, but after enabling the new switch, I’d lost all external network connectivity on the wired adapter. My virtual switch manager looked like this:
There will also be a whole lot of things listed in the Network connections (search for “View network connections” to find it-this screen likes to hide):
Each virtual switch is accompanied by a vEthernet adapter, and possibly a bridge (in the case of my wireless adapter). Now, in order to get everything working correctly after the initial setup (and occasionally after a reboot), I needed to do the following:
- Disable the vEthernet connection (public), the ethernet connection, and the bridge (if it was created)
- Enable the ethernet connection-wait until you have access
- Enable the bridge
- Enable the vEthernet connection
Once this is done, you’ll see something like this in the Network and Sharing Center:
Now, the nearest I can figure there were some race conditions in place here that meant that the virtual adapter came up first, and was trying to get a DHCP address from the DC on the virtual network. Whatever the reason though, the good news is that now the host and guest both have network access. This also means that your guest is going to get an IP from your main network’s DHCP server, and have all the access that it would had you plugged a cable into a physical machine, so be careful what you put on there.
Now at this point, there’s one other thing you’ll have to do if you want to remote desktop into the guest:
On the host OS, open your network connections and open the vEthernet adapter that’s on the PRIVATE network. Change the ipv4 properties to give the adapter a static IP on the same subnet as your VMs:
Now in the guest, change the IP settings of the private adapter to list the host’s static IP as the default gateway:
Now, you’ll be able to remote desktop into the guest from the host, which means you can enable remote audio like this:
And, you can even open up multiple remote desktop sessions, and connect audio to each of them, which means that two Lync clients could call each other without ever leaving your laptop. Of course, they’ll both be using the same audio device, but there’s not much we can do about that…or can we?
Actually, no, we can’t, or at least I haven’t managed to figure that part out yet. Using RemoteFX, you should technically be able to redirect a USB device through a remote desktop session like this:
In theory, this means that two USB speakerphones could be redirected to two different remote desktop sessions, and I could place calls between them, which would be a great lab setup. Unfortunately, this doesn’t appear to work in Windows 8. RemoteFX appears to depend on Remote Desktop Services, which isn’t present on Windows 8. So very close… Of course, I also wasn’t able to get RemoteFX USB redirection working on my Server 2012 instance, so maybe there’s something else going on? There’s a pretty comprehensive guide out there if you want to give it a shot, and I’d like to hear from someone who has this working. I use a couple of physical IP phones at the office for most of my Lync testing (a couple Polycom CX700s and a Snom 370), but having something I could use at home with a couple of Jabra Speak phones would be useful too.
In any case, now there’s a simple way to set up a development machine that’s joined to a corporate domain that can run Lync without being on a VPN. You’re probably not going to run a huge amount of volume through it, but placing a couple of calls or setting up a conference is certainly reasonable. Has anyone else tried this and come up with a better setup?