Deploying Windows 8 Virtual Desktop Infrastructure on Windows Server 2012

Share Button

Several months ago, fellow blogger Kees Baggerman covered RDS: Windows 8 Scenario-based RDS deployment which included a 10 minute YouTube video on RDS Session Virtualization (aka terminal services).  In this article, I am going to cover the other element of RDS scenario-based installation, Virtual Desktop Infrastructure. Microsoft VDI technologies have been around for several iterations of Hyper-V and Server 2008. With 2008 R2 SP1 Microsoft introduced RemoteFX, a promising technology for virtual desktop GPU acceleration.  However, in the past there have been several challenges with deploying Microsoft VDI, namely the initial desktop provisioning and stateless pooling.  With Server 2012, these two components have several promising enhancements.

First, Server 2012 now has a built-in provisioning mechanism whereby a powered down and SysPrep’d Hyper-V virtual machine can be used as a master desktop to provision collections of virtual desktops. This means that System Center Virtual Machine Manager is no longer a requirement or nicety for the initial provisioning of the systems. Additionally, this built-in provisioning mechanism uses VHD differencing disks, similar to the VMware linked clone and Citrix MCS disk chaining technologies.  Second, Server 2012 now has a stateless pooling and reverting mechanism whereby changes to the virtual desktops are reverted upon logoff. This means pooled VDI desktops are no longer tainted by previously logged in users. To demonstrate these capabilities, let’s start by deploying a simple VDI infrastructure including three servers: a Connection Broker (CB01), a Web Access server (WA01), and a Virtualization Host (HV01). Each of these three systems consists of typical installations of Server 2012, joined to a single domain.

Nearly all Server Manager tasks will be done from the Connection Broker, so we will start by adding the additional servers from All Servers -> Manage -> Add Servers:

Search for the applicable servers, select them and click the arrow to add them to the selected list. Click OK to proceed:

Select Manage -> Add Roles and Features:

Click Next to the welcome screen:

Select Remote Desktop Services installation and click next:

Select Standard deployment and click next:

Select Virtual machine-based desktop deployment and click next:

Review the deployment overview and click next:

Select the connection broker (CB01). Click the arrow to move it to the selected list and click next:

Select the Web Access server (WA01). Click the arrow to move it to the selected list and click next:

Select the Virtualization Host (HV01). Click the arrow to move it to the selected list. Select Create a new virtual switch on the selected servers and click next:

Select Restart the destination server automatically if required and click deploy:

The progress bar will indicate how much time is required for installation:

Upon completion ensure all tasks succeeded and click close:

Next, we need to deploy a Windows 8 virtual desktop that will be used as our master image moving forward. Login to the Hyper-V server (HV01) and launch Hyper-V Manager.  Right click the server in Hyper-V manager and select New -> Virtual Machine:

Name the virtual desktop and click next:

Assign an appropriate memory allocation, select use dynamic memory and click next:

Select the RDS Virtual network (Automatically created through the RDS wizard) and click Next:

Size the Virtual Hard Disk appropriately and click next:

Select the appropriate option for the Windows 8 installation media. In my case I have mounted the ISO to the D:\ drive of the Hyper-V host, which is where I will be installing from. Click next:

Review the summary and click Finish:

Right click the new VM and select Start:

Right click the new VM and select Connect:

The VM should boot to the installation media to start the Windows 8 install. Click Next:

Click install now:

Enter the appropriate license key provided with the Windows 8 Release Preview installation media:

Accept the license terms and click next:

Select Custom:

Select the appropriate disk and click Next:

The installation may take some time to complete, dependent on storage performance:

Upon completion, the sysprep first run setup will ask for the PC name. Provide the VM name and click next:

Select Use express settings:

Select sign in without a Microsoft account:

Select Local account:

Enter an account and password and click finish:

At this point you would typically customize the Windows 8 virtual desktop to install you base application set and personalization. For the sake of this blog post, I am going to proceed with Sysprep’ing and shutting down the virtual machine for provisioning a collection of desktops. Click Desktop to exit metro:

Click Explorer and browse to C:\Windows\System32\Sysprep\.  Launch Sysprep.exe:

Select Generalize and shutdown. Click OK:

Once the virtual desktop has shutdown it’s important that you detach the ISO or drive that was used for creating the virtual desktop. Otherwise, this will be carried with the virtual machine during the provisioning operations. Right click the Virtual Desktop and select Edit Settings. Select the DVD drive and pick none. Click OK to save the virtual machine:

In Server Manager on the Connection Broker (CB01) navigate to Remote Desktop Services -> Collections. Select Tasks in the top right and click Create Virtual Desktop Collection:

Review the welcome screen and click Next:

Enter a collection name and description. Be very specific when naming the collection as you cannot change this after the collection has been deployed. Click Next:

Select Pooled virtual desktop collection. Leave Automatically create and manage virtual desktops selected and click Next:

Select the virtual desktop we created previously and click next. If the desktop has not been sysprep’d you will receive a warning:

For this option you can optionally provide a sysprep inf file.  For our simple deployment, I will select Provide unattend installation settings.  Click next:

Select the Active Directory domain and Organizational Unit. Optionally, you can enter a distinguished name of the OU. Click next:

Enter the domain security group for access, number of desktops to provision, naming convention and click next:

If we had multiple hosts, the next screen would allow us to customize where the desktops are placed. Leave defaults and click next:

Leave store on each RD Virtualization Host selected for the simple deployment. Alternatively we could deploy the VMs on a highly available CIFS share or Cluster Shared Volume if we had multiple Hyper-V hosts. If you have higher performance storage available in the Hyper-V hosts, you can optionally redirect the template to a different drive (SSD for example).  Leave Automatically roll back the virtual desktop selected for stateless pooling discussed earlier. Click Next:

For the simple deployment, I am not redirecting the user profile disks. In a production deployment we would likely redirect the user profile disks to a highly available CIFS share to eliminate the need for roaming profiles:

Review the collection summary and click Create to start the provisioning process:

In the first stage, the virtual desktop will be exported from the Hyper-V host:

This export is stored in C:\RDVirtualDesktopTemplate on the Connection Broker for deployment to additional hosts at a later time.

Next, the provisioning process moves into deploying the template back to the host and starting the VM deployments:

Unless you change the path during the initial deployment, the default storage location for the templates will be C:\ProgramData\Microsoft\Windows\RDVirtualizationHost:

The first and subsequent desktops will begin to deploy, using the Sysprep information provided in the wizard:

Typically at a speed of 3-6 minutes per desktop, the deployment process will eventually complete successfully. Click close to confirm the collection was created:

Now, by default the Server 2012 provisioning mechanism will perform serialized operations, not parallel. Therefore, if it takes 3-6 minutes per desktop, that’s anywhere from 15-30 minutes for a pool of 5 desktops. If you scale this up to 100 desktops, it can get pretty significant for the deployment time.  This is where the Concurrency registry key comes into play.  The concurrency registry key controls the number of simultaneous provisioning operations that are permitted on a host-by-host basis (max recommended value 5).  To find this key on the HV01 host, I’ll open regedit and browse to HKLM\System\CurrentControlSet\Services\VmHostAgent\Parameters.  In this key is a REG_DWORD value that can be set to a value between 1 and 5. Update! Now this value can be set using Set-RDVirtualDesktopConcurrency PowerShell CMDlet!

Changes to this key require a reboot of the host to apply, so I will increase the value to 5 and reboot.  Now I will deploy an additional 5 virtual desktops and examine the results. From the connection broker, navigate to the newly deployed collection (Win8RP-VDI01). In the top right select Tasks -> Add Virtual Desktop:

Enter 5 and click next:

Confirm that all 5 will be created on the first and only host. Click next:

Click Create:

Now, in the Hyper-V Manager console, you’ll notice the desktops spinning up and provisioning all 5 at a time:

Now that we have a working desktop pool, let’s test access using the Web Access server. Open a browser and navigate to https://2012rc-wa01/RDWeb. Note, if this were a production deployment we would install Enterprise SSL certificates and create IIS Http Redirects so the /RDWeb would not need to be entered. After accepting the certificate error, login with appropriate credentials:

Launch the virtual desktop using the supplied icon:

Confirm that you want to connect Drives, Clipboard, etc.:

Upon connection, the user credentials provided will be seamlessly passed through to the virtual desktop:

Viola! We are now connected to a Windows 8 desktop via Server 2012 Virtual Desktop Infrastructure and RDS:

On the connection broker (CB01) the new session will be displayed in the Connections area in the bottom right:

Best of all, when I’m done tainting the virtual desktop, all user changes will be reverted as Hyper-V will revert to the saved state snapshot upon logoff.

If you have any questions, comments, or just want to leave feedback, please do so below. Thanks for reading!


Share Button
  1. OsepuOsepu04-24-2013

    This is avery good article. I have been successful with this. My challenge is to connect to the pooled VDI from the WAN. All works fine in the LAN environment. Could someone assist please? Thanks in advance….Joseph

  2. Chander SharmaChander Sharma04-13-2013

    I am facing these below issue.
    Please Help

    Remote Desktop Virtualization Host could not run the Hyper-V WMI job.Event id 8479

    Error description: ‘Win7-VDI-001’ failed to modify resources. (Virtual machine ID A691B6F2-0842-4A01-8E2B-0FD1E332D47F)
    See also Hyper-V event logs
    Hresult: 0x80078005

    ‘Win7-001’ failed to modify resources. (Virtual machine ID 2A4363C7-8FF0-44A3-8457-EF86D94C867F)
    event id :- 15090

  3. MarkMark01-28-2013

    Thanks a lot for your recommendations, Dane! I will try to start over again in the new environment.

  4. MarkMark01-25-2013

    Thanks a lot for the article, Dane!

    However, I encountered a problem: screen is never passed through. I confirmed that at that moment:
    1. Computer account for Win8RP-VDI01 is created in the AD.
    2. Win8RP-VDI01 VM is created and is visible in the Hyper-V console AND in the RD Web Access.
    3. When I attempt to click the Win8RP-VDI01 VM shortcut in the RD Web Access, I am getting an error: “There are no available computers in the pool. Try connecting again, or contact your network administrator”. The collection creation process times out eventually.
    4. I attempted to logon to the Win8RP-VDI01 VM, but the domain accounts are not valid and I don’t know the local admin password since it was sysprep’ed.

    1. How to fix it?
    2. Is there a way to confirm that the workstation “knows” that is joined to the domain?

    Thanks a lot for your help in advance!

    • Dane YoungDane Young01-27-2013


      I can’t say that I’ve run into this before. To validate that there’s nothing specific to your domain or environment causing the failure, can you stand up the exact environment described in this post in a clean/lab environment with a vanilla domain? Other than that, I would recommend digging through every event log to make sure there’s no obvious errors. The clean domain idea is my preference when I suspect there is something environment or domain specific causing complications with my deployments. Plus, it’s a good idea to have a sandbox environment to play around with these emerging technologies prior to deploying into a production domain.


      • RoshanRoshan01-29-2013

        Hi Dane,
        This is the best article for MS VDI so far… appreciate your good work…

        I have followed your all steps. Unfortunately stuck at same place where ‘Mr.Mark’ was.
        I manually logged into each VMs. After some time VMs were shut down by its own – (Part of VM creation)
        Later all VMs started and shows as running mode.
        Now when I try to access via web,

        1. Shows Incorrect Credentials “Credentials you used to connect to server did not work. Try different credentials (Note: All the time I was using domain administrator account, I also changed the password, but same result).

        2. When using testuser login (regular domain user), it shows error: There are no available computers in the pool, try connecting again or contact Network Administrator.

        Additional troubleshooting steps followed:
        – Have allowed Remote desktop manually for domain users in the VMs as well and added RDP users to be domain users.
        – Modified Group Policy to allow this computer from Network.
        – Dis-joined from domain and re-joined to domain.
        – Temporarily disabled firewalls in Server / Client.

        FYI, I have Server 2008 R2 Active Directory.
        Server 2012 and Hyper-V installed together.

        Dane, any workaround for this problem?


      • ChristinaChristina02-23-2013

        Hello Dane!

        I stumbled across this blog and loved the detailed steps to provision desktops. However, what really drew my attention were your two commenters (Mark and Roshan) who got stuck during the “Exporting the virtual desktop” phase.

        Pic (blue bar at exact stop point):

        Have you come up with a solution since this issue was brought up? Heard anyone else come across this issue and the common causes of it?

        PS. I did fresh installs on everything in an isolated lab environment. (I could go into more detail if you would like)

        • ChristinaChristina02-24-2013

          Hello again Dane!

          I finally found the problem and thought I would post it here if someone else came looking for it. In your instructions, you should point out during the part where you mentioned “customize the Windows 8 VD” that the VM should be connected to the domain. When I left the VM in a workgroup, the creation of the VDs hung up at that point and 2 hours later I got an error was about not finding the domain.

  5. ChrisChris01-23-2013

    Thanks Dane! This is a great article!
    I tried to set-up VDI on Server 2008 R2 and gave up. I have since upgraded to Server 2012, and found this article. Your procedure worked the first time through. Now I can work through testing the issues of configuration and maintenance that will need to be answered in order to sell it to customers.

1 4 5 6 7 8 12

Leave a Reply to Roland Click here to cancel reply.