Error creating RDS Collection

Hello.  I'm trying to install a RDS Collection for VDI and creating the first virtual desktop yields the following error:

"Failed: The VMHostAgent service timed out while waiting for the newly provisioned virtual desktop to start".  The following desktop operations are canceled.

I checked Hyper-V Manager and the desktop is created in a Saved state.  I started it and it appears to be fine.  I was able to log in, it was connected to the domain, so I'm not sure where the problem lies.

Is there a log file or a specific event log I can find errors relating to this process?

Any help would be much appreciated!

Thanks!

Jim

October 11th, 2012 9:47pm

If your VMs are Windows 7 SP1 then you should update the Integration Services in the template VM before you start to create the collection.
Free Windows Admin Tool Kit Click here and download it now
October 12th, 2012 1:40pm

Thanks for the reply!  Unfortunately, this has already been done.  I'm going to try to create a test collection today and see if I get the same error or if it was a fluke.  I'll let you know what I find.

Jim

October 12th, 2012 2:32pm

My test failed with the same error.

Boo.

Thanks for your help.

Jim

Free Windows Admin Tool Kit Click here and download it now
October 12th, 2012 3:06pm

Can you open C:\Windows\System32\tssesdir on your RDCB server and look for the *.xml files located there?  These are the provisioning reports and a good place to start.

Also look at the TSV-VMHostAgent and Hyper-V VMMS event logs on your RDVH Server for any errors related to the virtual machines.  What the error you see in the RDMS UI means is that we never got a notification from the RDVH server that the VM started, and this could be for many different reasons.  The most common is that the RDMS and or RDVH host cannot communicate with the VM over the network.

October 12th, 2012 3:51pm

Thanks for your help, Don.  I will check out the logs.  This is a single server implementation for proof of concept, so the RDMS/RDVH host not being able to communicate with the VM doesn't make sense.  They are all running on the same box.

Jim

Free Windows Admin Tool Kit Click here and download it now
October 12th, 2012 4:16pm

It depends on how you have your VMSwitch setup...how are you assigning an IP address to the virtual machines?  Did the VM ever get a valid IP address from a DHCP server?
October 12th, 2012 5:09pm

I checked the logs after another failure.  This is what was contained:

<rdvp:Vm>
          <rdvp:Name>XXXXXXXXXX</rdvp:Name>
          <rdvp:Status>Failed</rdvp:Status>
          <rdvp:ErrorCode>0x8813021d</rdvp:ErrorCode>
          <rdvp:ErrorDescription>Post-create/update failed</rdvp:ErrorDescription>
          <rdvp:StartTime>10/12/2012 02:23:14 PM</rdvp:StartTime>
          <rdvp:EndTime>10/12/2012 03:23:43 PM</rdvp:EndTime>
</rdvp:Vm>

I got the same error again in the console.  I booted the VM from the saved state and it was joined to the domain and had a valid IP address from the DHCP server.  The Quick Setup is working and I was able to add a couple more VM's to it.  But the VM's are local on the server instead of on the SAN as part of the cluster. 

Here are some other errors from the console previous to this one (from oldest to newest).

The Remote Desktop Virtualization Host Agent service could not register with the Hyper-V server.

Hresult: 0x80004005

Remote Desktop Services failed to join the Connection Broker on server SERVER1.ad.local.
Error: Current async message was dropped by async dispatcher, because there is a new message which will override the current one.

The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database.

Pooled virtual desktop collection name: NULL
Error: Logon to the database failed.

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

Error description: 'SERVER2' failed to modify resources. (Virtual machine ID 4DF520BE-D326-4782-9A2A-2E0EA30A6269)
See also Hyper-V event logs
Hresult: 0x80078005

Remote Desktop Virtualization Host could not detect the boot event from the virtual desktop named NMRDVKRCUS00.

Virtual desktop name: SERVER2
Hresult: 0x8813021D

Remote Desktop Virtualization Host could not successfully detect completion of SysPrep specialize phase in the virtual desktop [SERVER2].

VM host [SERVER1.ad.local] failed to execute VM Provisioning operation [Task: To perform post processing actions at VMHostAgent:] for virtual machine [SERVER2] in pool [VDI_Collection], Error: [Error code: 0x8813021D.]

VDI Collection: virtual desktop SERVER2 creation failed. Reason: The Remote Desktop Virtualization Host Agent service timed out while waiting for the provisioned virtual desktop to start.

These errors are from earliest to latest.  I saw some other posts about running a permissions script.  Is this a required step?  If so, what OU do I run it on?

Please let me know next steps.

Jim

Free Windows Admin Tool Kit Click here and download it now
October 12th, 2012 8:50pm

So here are the events that indicate where the issue lies:

"Remote Desktop Virtualization Host could not detect the boot event from the virtual desktop named NMRDVKRCUS00.

Virtual desktop name: SERVER2
Hresult: 0x8813021D"

So this means that as far as the Connection Broker can tell the virtual machine is not booting, or at least Hyper-V is not indicating to us that it has booted. What is curious is why the virtual desktop name here is "server2"?

Here it is again...

"Remote Desktop Virtualization Host could not successfully detect completion of SysPrep specialize phase in the virtual desktop [SERVER2]."

"VDI Collection: virtual desktop SERVER2 creation failed. Reason: The Remote Desktop Virtualization Host Agent service timed out while waiting for the provisioned virtual desktop to start."

So I am confused here....which VM is the one you are trying to create?  What is the other VM named NMRDVKRCUS00?

The process of creating a managed pool is a long running process with several phases it has to go through.  You do not need to run a script on the VM to "provision" it like you did in 2008 R2, in Windows Server 2012 we do that for you now. The first part of the process is exporting the template VM to the export folder defined in the RDMS UI.  We then create a VM on the RDVH host, create a machine account for it in AD, and then boot it up.  Since the VM is sysprep'd, we have to wait for the VM to finish the sysprep process, at which point we will verify that it is online and has a valid IP address.  We will then provision it by configuring the settings needed to connect to it via Remote Desktop.  Finally, the VM is snapshotted (if you specified that in the UI) and then put into a saved state.  We then repeat this process for all of the VMs in the collection.

If you are watching the VM in Hyper-V manager you should see it finish the sysprep process, and then stop at a logon screen.  Several seconds later you should see the VM moved into a saved state.  This can take a fair bit of time depending on your hardware and how fast your disk subsystem is, etc.  We won't wait forever though, and if the VM never finishes sysprep or we can never connect to it over the network we will eventually give up and move on to the next VM. The events logged indicate that the VM never finishes sysprep, so can you verify this by watching the VM (connect to it with VMConnect if you have to) during the collection creation? Also, what sysprep command did you use on your template VM when you were preparing it?

October 12th, 2012 10:22pm

Sorry Don. I was trying to mask the names...guess I missed one! The VM name is NMRDVKRCUS00. The sysprep cmd is using the GUI from sysprep. I set it to OOBE and clicked generalize checkbox. Should I use a command line? I used the same template with the Quick setup and it worked so I don't see that being the problem. I'll watch the sysprep process but I see the VM in HyperV Manager as a Saved state and I can boot it normally manually from there so it looks like the host is timing out too soon. Is there a way to lengthen the timeout? But again, it worked with the quick setup. Could it be a delay accessing the SAN...that's the only difference I see between the two attempts. It's a GB connection... Jim
Free Windows Admin Tool Kit Click here and download it now
October 13th, 2012 2:52am

Yes you should use the command line to sysprep it as you need to add the /mode:vm switch.  This helps sysprep complete much faster on a VM.

sysprep /generalize /oobe /shutdown /mode:vm

October 13th, 2012 12:47pm

I tried this command on my Windows 7 SP1 Template and it failed to find the /mode:vm parameter.  Is there a version of sysprep.exe that I can download that has this function?  Can I copy it from a Windows 8/Windows 2012 Server?
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2012 7:34pm

That's a new switch for Windows 8 only.

So how long does it take for your Windows 7 SP1 VM to complete sysprep?

October 15th, 2012 8:55pm

I'm running that test shortly.  I had to create a new template because it has had sysprep run too many times on it during my testing.
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2012 9:14pm

Also make sure to update the Integration Services since this is a Windows 7 SP1 VM.  BTW, Windows 8 can be rearmed up to 1000 times now, so keep that in mind. 
October 16th, 2012 1:34pm

Thanks Don.  I rebuilt the template VM (as I ran out of rearms), ran sysprep via the command line (without the mode switch because it doesn't exist on Win7), and the collection build succeeded.  Is there a way to change the template without increasing the rearms on Win7?  Can I create a snapshot on the template prior to the sysprep to use to install apps/make config changes?

I think I'm almost there.

Jim

Free Windows Admin Tool Kit Click here and download it now
October 16th, 2012 3:02pm

Don,

I'm running into that error again.  The sysprep of the first VM goes pretty quick (probably less than 20 seconds) and ends up in a saved state.  But the process never moves to the second VM in the collection.  Is there a way to not use sysprep rearms with Win7?  I think I'm running out of rearms, but I don't want to have to rebuild the template from scratch everytime I want to do an update.

Any other thoughts?

Jim

October 19th, 2012 4:22am

Hi,

I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Thank you for your understanding and support.

Regards,

Clarence

TechNet Subscriber Support

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2012 6:51am

Hi, 

 

To properly license VDI you need to have Software Assurance or VDA, which entitles you to Windows 8 Enterprise.  Microsoft's intention is that if you are doing VDI then you use Enterprise, so it makes sense.

Additionally you need RDS CALs to cover use of the RDS components.  If you buy the VDI suite then it includes a limited RDS CAL to cover use of RDS for VDI purposes (but not for RDSH session)

Thanks. 

Kevin Ni

October 23rd, 2012 9:03am

Hi All,

I figured out my problem.  After I had tried to do this process several times, I was creating stale DHCP records for the same machines over and over with different IP addresses.  This was causing the first VM to hang during deployment.  Once I cleaned up the stale DHCP records, the process completed flawlessly. 

Thanks for all your help!

Jim

  • Marked as answer by Jcoons72 Tuesday, October 23, 2012 1:40 PM
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2012 1:40pm

Thanks for letting us know what fixed it Jim. 
October 23rd, 2012 7:43pm

I checked the logs after another failure.  This is what was contained:

<rdvp:Vm>
          <rdvp:Name>XXXXXXXXXX</rdvp:Name>
          <rdvp:Status>Failed</rdvp:Status>
          <rdvp:ErrorCode>0x8813021d</rdvp:ErrorCode>
          <rdvp:ErrorDescription>Post-create/update failed</rdvp:ErrorDescription>
          <rdvp:StartTime>10/12/2012 02:23:14 PM</rdvp:StartTime>
          <rdvp:EndTime>10/12/2012 03:23:43 PM</rdvp:EndTime>
</rdvp:Vm>

I got the same error again in the console.  I booted the VM from the saved state and it was joined to the domain and had a valid IP address from the DHCP server.  The Quick Setup is working and I was able to add a couple more VM's to it.  But the VM's are local on the server instead of on the SAN as part of the cluster. 

Here are some other errors from the console previous to this one (from oldest to newest).

The Remote Desktop Virtualization Host Agent service could not register with the Hyper-V server.

Hresult: 0x80004005

Remote Desktop Services failed to join the Connection Broker on server SERVER1.ad.local.
Error: Current async message was dropped by async dispatcher, because there is a new message which will override the current one.

The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database.

Pooled virtual desktop collection name: NULL
Error: Logon to the database failed.

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

Error description: 'SERVER2' failed to modify resources. (Virtual machine ID 4DF520BE-D326-4782-9A2A-2E0EA30A6269)
See also Hyper-V event logs
Hresult: 0x80078005

Remote Desktop Virtualization Host could not detect the boot event from the virtual desktop named NMRDVKRCUS00.

Virtual desktop name: SERVER2
Hresult: 0x8813021D

Remote Desktop Virtualization Host could not successfully detect completion of SysPrep specialize phase in the virtual desktop [SERVER2].

VM host [SERVER1.ad.local] failed to execute VM Provisioning operation [Task: To perform post processing actions at VMHostAgent:] for virtual machine [SERVER2] in pool [VDI_Collection], Error: [Error code: 0x8813021D.]

VDI Collection: virtual desktop SERVER2 creation failed. Reason: The Remote Desktop Virtualization Host Agent service timed out while waiting for the provisioned virtual desktop to start.

These errors are from earliest to latest.  I saw some other posts about running a permissions script.  Is this a required step?  If so, what OU do I run it on?

Please let me know next steps.

Jim

Dear Jim,

May I know how you solved the below ERROR?

"The Remote Desktop Virtualization Host Agent service could not register with the Hyper-V server."

Hresult: 0x80004005

I am facing this one now and I cannot be sure what to do next.....

Regards,

Leon Li

Free Windows Admin Tool Kit Click here and download it now
April 16th, 2014 1:48am

Dear Jim, Leon Li,

Can you please let me know how the below issue is solved?

"The Remote Desktop Virtualization Host Agent Service could no register with the Hyper-V server"

I am stuck with the error and unable to proceed further...

Thanks in Advance!

--------------------------
Jayachandran

June 9th, 2014 7:27pm

Hi all,

I've the same problem as jcoon72 had. Collection creates a vm, vm is running and joined to the domain, has an IP address and visible in dns manager. Unfortunately the create collection wizard get the same error:

"the remote desktop virtualization host agent service timed out while waiting for the provisioned virtual desktop to start"

firewalls are disabled and stale DHCP records are cleaned up..

Special at my system is that hyper-v is nested on a esxi (but all hyper-v vm's are running normally).

Anybody an idea? Slowly I'm despair! I spend many, many hours without a solution.

Thanks for all you help!

Angelo

Free Windows Admin Tool Kit Click here and download it now
June 5th, 2015 7:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics