PvS – Create Devices

Last Modified: Sep 17, 2016 @ 8:25 am


Target Device Template – vSphere

The hardware of the additional target devices must match the original virtual machine. This is so the drivers contained in the vDisk continue to function. The easiest way to preserve the hardware configuration is to clone the original virtual machine.

  1. Shut down the original virtual machine.
  2. Edit the Settings of the virtual machine and make sure there is a blank, formatted cache disk.
  3. In the vSphere Client, right-click the original virtual machine and click Clone.
  4. In the Select a name and folder page, enter a name for the template and click Next.
  5. In the Select a compute resource page, select the cluster and click Next.
  6. In the Select storage page, select a datastore for the template and click Next. Note: if you use the Provisioning Services wizards to create Target Devices, the new machines will be created on the same datastore as this template.
  7. In the Select clone options page, don’t check anything and click Next.
  8. In the Ready to complete page, click Finish.
  9. Now convert the virtual machine to a template using the normal means (right-click > All vCenter Actions > Template > Convert To Template).

Target Device Template – Hyper-V

If you store the template in the library then you might see the issue described in CTX128750 Hyper-V Synthetic Network Interface Card Reinitializes on New Target Devices. The article recommends cloning a real VM instead of a template VM but this might not work for Provisioning Services XenDesktop Setup Wizard.

  1. Edit the Properties of the original virtual machine and make sure there is a blank, formatted cache disk.
  2. Right-click the original virtual machine, expand Create and click Create VM Template.
  3. Click Yes to acknowledge that the source virtual machine will be destroyed.
  4. In the VM Template Identity page, give the template a name and click Next.
  5. In the Configure Hardware page, click Next.
  6. In the Configure Operating System page, select None – customization not required and click Next. There is no need to run SysPrep.
  7. In the Select Library Server page, select a library server and click Next.
  8. In the Select Path page, click Browse to select a share and click Next.
  9. In the Summary page, click Create.

XenDesktop Setup Wizard

The easiest way to create a bunch of Target Devices is to use the XenDesktop Setup Wizard that is built into the Provisioning Services Console.

From Considerations: Provisioning Services for Personal vDisk at Citrix docs.citrix.com:

  • The Soap Service account must be added to the Administrator node of Studio and must have the Machine Administrator or higher role. This ensures that the PvD desktops are put into the Preparing state when the Provisioning Services (PVS) vDisk is promoted to production.
  • The Provisioning Service versioning feature must be used to update the personal vDisk. When the version is promoted to production, the Soap Service puts the PvD desktops into the Preparing state.
  • The personal vDisk size should always be larger than the Provisioning Services write cache disk (otherwise, Provisioning Services might erroneously select the personal vDisk for use as its write cache).
  • After you create a Delivery Group, you can monitor the personal vDisk using the PvD Image Update Monitoring Tool or the Resize and poolstats scripts (personal-vdisk-poolstats.ps1).

Do the following to launch the wizard:

  1. The XenDesktop Setup Wizard uses the Hosting Resources defined in Studio so configure them with destination datastores and networks for the new Target Devices.
  2. If vSphere, XenApp / XenDesktop 7.6 has a bug. To workaround this, in the hosting resource, configure the option Use different storage for Personal vDisks. You can select the same storage for both the linked clones and the Personal vDisks. Configure this even if you’re not using Personal vDisks.
  3. Make sure the Template Target Device is on the same datastore that you want the new Target Devices to be stored on.
  4. If Hyper-V, make sure the VMM Console is installed on the same machine as the Provisioning Services Console.
  5. In the Provisioning Services Console, right-click the site and click XenDesktop Setup Wizard.
  6. In the Welcome to XenDesktop page, click Next.
  7. In the XenDesktop Controller page, enter the name of a XenApp/XenDesktop controller and click Next.
  8. In the XenDesktop Host Resources page, select a hosting resource. This list comes from the Hosting Resources created inside Studio. Click Next.
  9. Login to vCenter or SCVMM when prompted.
  10. In the Template page, select the Target Device template and click Next.
  11. In the vDisk page, select the Standard Image vDisk and click Next.
  12. In the Catalog page, enter a name for a new catalog and click Next. Or you can add machines to an existing catalog.
  13. In the Operating System page, make your selection and click Next.
  14. If you selected Windows Desktop Operating System, then in the User Experience page, select random or static and click Next.
  15. In the Virtual machines page, enter the number of machines you want to create.
  16. For RAM caching add 256 MB (virtual desktop) or 4 GB of RAM (Remote Desktop Session Host). See Citrix Blog Post Size Matters: PVS RAM Cache Overflow Sizing for more information.
  17. Specify the size of the cache disk. 15-20 GB for session hosts and 5 GB for virtual desktops.
  18. Select BDM disk or PXE boot and click Next. For PXE boot, the Target Devices must be on the same VLAN as the Provisioning Services servers.
  19. In the Active Directory page, click Next.
  20. In the Active Directory accounts and location page, select an OU.
  21. Enter a naming pattern for the new machines and click Next.
  22. In the Summary page, click Finish.
  23. Then click Done.
  24. In Citrix Studio, you’ll see a new machine catalog.
  25. The PvS XenDesktop Setup Wizard seems to ignore zones (XenApp/XenDesktop 7.7 or newer) so you’ll have to move it to the correct zone manually.
  26. Create a new Delivery Group or add the machines to an existing Delivery Group.

Boot Disk Manager Partition Update

During PvS XenDesktop Setup Wizard, you can configure the Target Devices to use a BDM Partition to boot from Provisioning Services. This partition contains the IP addresses of the PvS servers. Prior to PvS 7.9, it was not possible to change the BDM Partition configuration.

In PvS 7.9 and newer, it is now possible to update the BDM Partition with the latest bootstrap info:

  1. In PvS Console, go to MyFarm > Sites > MySite > Servers, right-click each PvS server and click Configure Bootstrap. Update the list of PvS servers.
  2. Go to MyFarm > Sites > MySite > Device Collections, right-click a collection created by the XenDesktop Setup Wizard, expand Target Device, and click Update BDM Partitions.
  3. Click Update Devices.
  4. Click Close when done.

Write Cache Size

Write Cache Filling Up Disk

From Carl Fallis at Citrix Discussions: The vdisk cache is basically a difference disk and only contains the blocks that are written to the system drive so you cannot mount it or read the file, it is just block data.  What you need to do is use a tool like Process Monitor from Microsoft (used to be sysinternals) and monitor the system drive. Any write to the system drive is redirected by the PVS software to the cache file.  You should make sure that any software that is installed on the target image does not have an auto update feature enabled, redirect all user data to a network share and educate your users to make sure they are not doing something that will fill up the cache like downloading a video to the local system drive.

Be aware that the RAM cache with overflow to hard drive can use more space on your local drive, it is important even in the older cache that you perform regular maintenance on your vdisks some recommendations:

  • Merge to a new base disk when you have created 5 or more versions
  • After every merge to the base disk, mount the new base disk and defrag the disk, this is important to reduce sectors used in the local cache, it is very important with the new RAM cache with overflow to local disk but it can have a very positive impact with the legacy local cache. Refer to http://blogs.citrix.com/2015/01/19/size-matters-pvs-ram-cache-overflow-sizing for more information.

Write Cache Size Monitoring

To view the size of Write Cache in RAM with overflow to disk, look in Task Manager for Nonpaged pool.

Matthew Nichols Monitor Citrix Pvs ‘Cache In Ram’ Size Using Powershell has a PowerShell script that uses WMI to poll a remote device for the size of the Nonpaged pool.

Andrew Morgan Accurately checking the Citrix PVS “cache in Ram, Overflow to disk” RAM cache size details how to use poolmon to view the actual RAM allocation for the write cache. And there’s a PowerShell script to extract the information from poolmon.

Citrix Blog Post Digging into PVS with PoolMon and WPA details how to use Windows Performance Analyzer to view Provisioning Services RAM cache and overflow.

Related Topics

Email this to someonePrint this pageTweet about this on TwitterShare on LinkedInShare on FacebookPin on PinterestShare on RedditShare on StumbleUpon

62 thoughts on “PvS – Create Devices”

  1. After upgrading from PVS 7.8 to PVS 7.11 (together with upgrading from XD 7.8 to XD 7.11) the XenDesktop Setup Wizard is no longer working.

    After launching the wizard and entering the XenDesktop Controller address, we receive the following error:
    “Cannot connect to the delivery controller at address ; XenDesktop FullAdmin or MachineAdmin Permission Reqruied”

    In Citrix Studio both the logged-in user account and the PVS service account are configured as “Full administrator”.

    Any idea?

    1. Fixed or Dynamic refers to disk space allocation. I assume you’re doing non-persistent linked clone, which means only the cache disk grows.

      If you’re doing persistent VMs, then I wonder why you’re using PvS? It would be easier to create full clones in your hypervisor, or use the new MCS Full Clone feature in 7.11. There’s almost no benefit to PvS for persistent VMs.

  2. Hi Carl,

    We have configured Citrix PVS 7.8 and created a Vdisk Image from UEFI Virtual Machine. In Dhcp 66 and 67 along with 11 options are configured. in option 67 i have mentioned the bootfile name i.e. pxxx64… which is compatable for the UEFI target machines to get the boot file from PVS.

    I have some legacy bios Vdisk and I want to stream this vdisk for legacy bios VM’s and I am not able to understand where I need to mention this ardbp32.bin file in DHCP.

    Can you please help me with this ?


    1. One option is to boot the legacy machines from ISO. Another option is to create DHCP reservations for the legacy machines and adjust 67 for those reservations.

  3. Hi Carl, great manual, thanks!
    We experience the “Hyper-V Synthetic Network Interface Card Reinitializes on New Target Devices” issue.

    Whenever a new machine is created from a template it generates a blue screen when it boots. This behavior does not occur when a clone is used in stead of a template, just as the article explains.

    Is there any way we can still use the XenDesktop setup wizard to create VM’s? It only recognizes templates, not clones.
    Or does this automatically mean we have to create all VM’s by hand using clones?

      1. I created the template from a clone, yes.
        I don’t have the possibility to use the actual clone in the XenDesktop setup wizard, it only recognizes templates.

        1. Update: Got this working by starting over and doing the whole process again. Now my VM’s are all nicely booting from their BDE drive, even though they are GEN2. Just make sure secure boot is disabled.
          Create a clone first, than create a template from that clone, and use it for the XenDesktop wizard.
          It does seem to work that way. Just make sure there aren’t any ISO’s mounted on the original VM, Clone and template while going trough the process.

  4. Hi Carl,

    Hyper-V is hosting my infrastructure, so my target devices boot from a legacy NIC with a second synthetic NIC on the same VLAN as the legacy NIC and a third synthetic NIC for front end LAN communication, when the OS is loaded.

    I’ve started seeing a very odd problem where the vDisk streams OK and the OS loads, but when the OS is loaded I have noticed that the synthetic NICs are not being assigned an IP from DHCP. If I put the vDisk back into Private mode and boot from the master image device, the NICs get an IP.

    I’ve also tried an image with the 7.6 VDA that ships on the install media and the 7.6 FP3 version of the VDA, both with the same result.

    Is this something you have come across in any Hyper-V implementation you have done? I tried researching the problem online, but I’m not finding any other cases that report the same symptoms.

    Any help would be greatly appreciated.


  5. Great Article and Site!

    Was wondering if you had any thoughts on thin provisioning for the PVS Cache on disk on the Xendesktop. We have issues with the cache disk growing in size and never resetting even after reboots within Vmware. We found that putting the disk to Nonpersistent mode allows us to reclaim the used disk space after the machine is rebooted/shutdown. However we loose the option to v-motion the machines to different datastores if needed while the machine is on.

    Thanks again!

      1. Possibly.. The cache drive is 12gb. The machines have 4gb of RAM and a page file of 8gb. Our Citrix Platinum Solutions Advisor recommended and implemented this setup with PVS for best space savings/performance. Perhaps we need to look into MCS instead, since our 300 Xendesktop environment takes a lot of space on our SAN.

        1. While you can certainly create the cache disks as non-persistent, I would size the LUN for full cache disk utilization.

          The MCS comment was geared towards the disks shrinking after a reboot. I’m not certain that the peak MCS cache disk usage would be much smaller than the PvS cache disk.

  6. Outlook isnt using “Cached Exchange Mode” . Normally users will open up outlook and allow it to run and sit in the background or on a second monitor. The document management apps are probably heavily used.

    1. The only way to know capacity for sure is to do capacity testing. For simulated users, see LoginVSI. Or, get some users on the machine, watch performance, and ask users if performance is suffering. If not, add more users until performance declines.

  7. Hey Carl, I have everything working pretty well. My cachedisk in on D: and RAM cache with overflow to disk is working. One thing I don’t understand is what is the point of the Default Write Cache locations under the store properties in PVS. I specified a CIFs location there, but it doesn’t use it because I have a cache disk, but every time I try to remove the cifs location in the store properties, it just tells me something had to be specified. Is there a reason I need something specified in the store properties?

    1. If your Target Device cache disk is not setup correctly then PvS will fallback to putting the cache disk on the PvS server. Your write cache folder should always be empty.

  8. Hi Carl,

    Thanks a lot for your more than valuable articles !
    I’ve got something weird about the write cache disk.
    My master Vmware machine has 2 disks (1 for local boot, 1 for writecache independent/non persistent)
    While being in private mode, I setup Windows 7 so that my write cache disk is formatted NTFS, volume D:, basic disk
    and I instructed the OS to put the pagefile on this disk.
    My template Vmware has 1 only disk (1 for writecache).
    After putting the vdisk in standard mode, I used the Xendesktop streamed VM to create one validation machine.
    The machine boots fine except that Windows do not know the partition for the write cache and therefore
    it created a temporary page file on the C drive.
    Where did I go wrong ?

    Kind regards


    1. I usually don’t move the pagefile. Leave it on C: and PvS will move it automatically.

      Also, make sure the maximum size of the pagefile is less than the size of the D: drive.

      1. Allright, so instead of setting a fixed size on D:, I set it as “system managed size” on C: ? (and then as written in the CTX122141 article, the PVS TDS places the pagefile automatically on the next available volume like D, E, F ?). What about the fact that when I go in the Disk management console (while being in the target device started in standard mode), I got the popup asking me to define a newly discovered disk as an MBR disk and then I have to create the volume, format, etc .. ?
        It’s just like the settings I made in master/private mode are not held, that puzzles me a bit.

        1. Your template should definitely have a NTFS formatted cache disk.

          Or the XenDesktop Setup Wizard will do it for you.

          The pagefile should be set to a fixed size (not system managed) that is smaller than the cache disk.

  9. Great article, worked fine.
    Question: If we want to “persist” changes in some machines ONLY (e.g. registry keys and static IP) after reboot, any idea how we can go about it?

    1. For registry keys, are they HKLM? Or HKCU? If HKLM, use a scheduled task to write the values to a network share. Then use a computer startup script to reapply the values. For HKCU, use roaming profiles.

      For Static IP, you can use either DHCP reservations? Or you can build the Target Devices using Personal vDisk. PvD would also preserve HKLM registry keys.

  10. Hi Carl,

    thanks for providing such a great website !

    currently using pvs 7.6

    If i need target devices with different CPU allocation ( some pooled desktops with 2 vCPUs some with 4vCPUs ) would I need separate vdisks images for these , sealed with the appropriate resources allocated at the time ? I tried to just increase the CPUs in the xencenter console and the target device is now requesting a restart ( which seems pointless in read-only image )


    1. Changing the hardware might require new drivers in the image. Usually you build the image with all needed drivers. Then you select the paticular hardware on each Target Device. If you use the XenDestkop Setup Wizard then the wizard will ask you for the specs of each VM.

      1. in the case of my different CPU requirements , do you mean i should seal the image with the maximum number of CPUs I anticipate for some of our VDIs and then when it comes to the Xendesktop wizard build the target devices with a possible reduced number of CPUs ?

      2. Carl, I see your answer to Ralf. This would be great to know as it is always something I wasn’t sure about. How do you break up different needs for RAM and CPU in the same pool of PVS machines? Is it as simple as making sure all different resource configurations of RAM and CPU have been attempted in the MTD, and then rebooted, before creating that vDisk? How can you change RAM for a user that really needs the excess while keeping that person on the same image and in the same pool of machines without it asking for a restart?

        1. If CPU/Memory change requires a reboot, then look in the file C:\Windows\Inf\setupapi.dev.log to determine which driver requested the reboot.

          1. Thanks Carl! After that, Is it as simple as updating that master image in maintenance mode with that driver or would I need to put it in private mode?

  11. Hi Carl – have you tried to use VMware storage clusters with PVS & the streamed VM setup wizard? It won’t recognize the storage cluster and just ends up creating the VMs on the same data store where the template resides. Is there a better solution than creating a template on each data store to address this? Would love to get your thoughts!

    1. Disregard my previous message – turns out that there are too many limitations with the streamed VM setup wizard such as the lack of support for storage clusters…so I am going to have to use the XenDesktop setup wizard and make sure that I have a host connection in XenDesktop that has the ability to access all of my storage datastores.

  12. Hi Carl,

    I created my news VMs inside PVS Console 7.6 and the respective catalog on Delivery Controller, following your explanation described above. I’m using XenDesktop 7.6 Environment on XenServer 6.5. The procedure worked fine, but I had a problem with the NICs on the VMs.

    I got two NICs: one Physical NIC for my server’s environment communication and I created a Private Network (Virtual NIC) for PVS Services (this is a Demo Environment on the single XenServer). The template which I used to create the VM have the two NICs (I need the physical NIC to login on the VMs with an Active Directory user account) and the Resources I configured on Delivery Controller also. The XenDesktop Setup Wizard asked me the Network for PVS Services and I selected the dedicated network for it (the Virtual NIC). When the VMs turn on, they see the two NICs but like a same network, the physical NIC got the same IP address of the Virtual NIC and that is a problem for me, because I not able to login on the VM whit the Active Directory user account (the AD server reside into another network, to reach this network I use the physical NIC)…

    Could you help me to understand this issue?

    Thanks a lot in advance for your cooperation.



    1. Are the virtual NICs connected to different XenServer networks? How else would both NICs get the same DHCP IP?

      I personally never do two NICs in my PvS machines. I also almost never use XenServer. So you might want to post your question to http://discussions.citrix.com.

      1. Yes, the virtual NICs are connected to different networks and each network has the own DHCP server (one DHCP for the domain and another for PVS Services). Furthermore, I set the binding only for the NIC dedicated to PVS on the DHCP which assign IP address to the VMs created with PVS Services (I made the same configuration for domain DHCP, associated only to the NIC dedicated to the domain).

        If I use the “Streamed VM Setup Wizard” to create a new VMs, everything works properly and each virtual NICs get the right IP address of the networks which belong, but if I use “XenDesktop Setup Wizard”, I’ve always the same problem with the IP addresses of the NICs… This stuff is a mystery for me…

        What do you think about this?

        1. The XenDesktop Setup Wizard uses the Hosting Resources defined in Citrix Studio. I can’t recall if those Hosting Resources support multiple NICs per VM. MCS uses the same Hosting Resouces so you might be able to Google search for MCS and multiple NICs.

          1. OK, thanks Carl, I’ll do the research and I’ll let you know! 🙂 Congratulation for this article, very useful and interesting like all your articles!

            Have a good weekend and Merry Christmas!


  13. Hi Carl turned to be that the console hadn’t refreshed. Also, as I’m using (god damned!) Hyper-V, it puts the synthetic NIC first in the boot order when it creates the VM. I copied the MAC address from the synthetic, NIC into the properties of the legacy NIC and was able to boot successfully.

    Do you know of a way around this? I’d like to specify that the VM is created with the legacy NIC taking priority.


  14. Hi Carl, I’m using the XenDesktop Setup Wizard to deploy Windows 2012 R2 shared desktop services. Everything works perfectly until the the VM is created. The wizard completes successfully, the AD account and Machine Catalogue are created, but there is no device created in PVS. Consequently, the VM wont boot from PXE as there is no device in the DB.

    I must’ve missed a vital step, but I’ve been through the above and cant seem to pin down what I’ve missed.

    Any thoughts?

  15. Carl,

    Thank you for all this great documentation. I’m having an issue with the Xendesktop Setup Wizard. I run through the wizard, select my template and go to create the VMs and it is creating them in the wrong cluster in vCenter. The template is saved on a host in my VDI cluster yet it starts creating them in a different cluster. The clusters share the same storage but I figured it would create the VMs where the template resides. Any help is appreciated.


      1. Thanks…I had it set wrong in there.

        In my current XD 7.5 environment with XenServer 6.2 hosts, running the wizard creates VMs pretty quick. My new XD 7.6 environment is on ESXi 5.5 U2 and it takes ~2 minutes to create 10 VMs with the wizard. Is this normal?

  16. Hi Carl, Thanks for the awesome documentation!

    I’m a bit stuck at this point now – I’m trying to use XenDesktop Setup Wizard to deploy VMs using local host (ESXi 5.5) storage for the cache disks. I’ve got 2 templates, 1 copy on each of the local datastores. In Citrix Studio Hosting node I’ve got two resources configured, one for each host with only the local storage selected (and shared storage for PvD). The environment is XD 7.6 and PVS 7.6.

    When I select the host specific resource, the correct template is presented. The problem is that no matter which of the resources I select the task always runs on the same node which obviously cannot access the template on the other datastore, so currently I can only deploy VMs from one template, on that one host. There doesn’t seem to be any way of my selecting which host to run the task on.

    Do you know how I can get around this?


  17. Thanks Carl, We will be using RAM cache with overflow to disk and the article talks about the benefits of RAM cache with reduced load to overflow disk.
    So I presume standard Tier 2 ISCSI shared storage will be ok?

  18. I meant the underlying storage to store write cache files. (Does it needs to be Tier 1 Flash and what type of storage NFS or ISCSI?

    1. I usually give the storage team a guesstimate of the IOPS and disk space requirements and let them figure out a solution. As long as the shared storage meets the IOPS and disk space requirements then it should work. I recommend working with a Citrix Partner to assess the requirements and design a solution.

      1. Carl,

        Question regarding VDA specs/sizing for Shared Desktops. Here’s a breakdown of what im currently spec’d at and what the desktops are mainly used for. Any suggestions/adjustments would be greatly appreciated.

        Using PVS 7.7

        Server 2008 R2
        14gb RAM
        60gb C:
        30gb Write Cache

        Mainly the desktops are used for mostly Outlook, Word & Excel (with add-ins) and programs that are used for document management. So majority of the workload is going to be via those apps.

        How does my sizing look?

          1. 4 vCPUs is typical for 2008 R2.

            15-20 is not unreasonable. But it depends on the apps and how they are used.

Leave a Reply