Enable Audio in Windows 2008 guest machines running on HyperV

One of the very first things that I had to do after joining Microsoft was to build my own lab. Building a lab of your own is always a fun excercise, you get to do whatever you want to do.You get to plan, deploy, test and then break the system and get used to it.
An interesting problem that came up while building my lab was to enable Audio (Sound?) on my guest machines so that I can place calls and here UM voice prompts on them. In VMWare, VirtualPC, VirtualBox and other virtualization software its just a matter of adding a virtual sound Device/Adapter. On HyperV there is a slightly different approach, you do not have to emulate Audio as a driver. All you have to do instead, is start the "Windows Audio" Service and then configure your RDP settings to ensure that Remote Audio is played on your local machine.

If your guest systems are running Windows Server 2008 or 2008 R2 there are a few additional steps to enable Audio in terminal services properties. Here is a step by step guide to get Audio up and running on your guest systems.

  1. Enable 'Windows Audio' service.
    1. Login to your Guest OS and head to Services MMC (Start > Run > Services.msc)
    2. Locate 'Windows Audio' service and start it. (I'd also recommend changing the 'Startup Type' to 'Automatic')
  2. Now to modify the Remote Desktop host configurations
    1. Go To Start > All Programs > Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration
    2. Under the section labeled 'Connections' select 'RDP-tcp' connection
    3. Right click on the connection and go to 'Properties'
      clip_image001
    4. Go to the 'Client Settings' tab and un-check both 'Audio and video playback' and 'Audio recording' to enable these features.
      clip_image002
  3. If you are connected to the guest via an RDP session, you will now have to disconnect and reconnect to the session for changes to take effect.
  4. Configure RDP client for audio.
    1. Launch your RDP client. (Start > Run > mstsc)
    2. Click on Options and then head to 'Local Resources' tab
      clip_image003
    3. Click on Settings and then ensure that 'Play on this computer' is selected.
      clip_image004

You should now be able to connect to your guest machine via a Remote Desktop Connection and use audio services.

Additional Resources: http://blogs.msdn.com/b/virtual_pc_guy/archive/2006/06/29/648105.aspx