PvS Master Device – Preparation

Last Modified: Mar 14, 2017 @ 5:16 am


đź’ˇ = Recently Updated

General Preparation

Citrix CTX131611 – Known Hardware Related Provisioning Services Issues

  1. Build the VDA like normal.
  2. Update VMware Tools.
  3. Join the machine to the domain.
  4. Citrix CTX128058 Recommended Operating System Patches for Provisioned Windows Targets contains a list of recommended hotfixes for Windows 2008 R2 and Windows 7. Or just install the Convenience Rollup.
  5. Chrome – CTX212545 PVS 7.6 CU1: Write cache getting filled up automatically recommends disabling Google Chrome automatic updates.


Ensure the pagefile is smaller than the cache disk. For example, if you allocate 20 GB of RAM to your Remote Desktop Session Host, and if the cache disk is only 15 GB, then Windows will have a default pagefile size of 20 GB and Provisioning Services will be unable to move it to the cache disk. This causes Provisioning Services to cache to server instead of caching to your local cache disk (or RAM).

The cache disk size for a session host is typically 15-20 GB. The cache disk size for a virtual desktop is typically 5 GB.

  1. Open System. In 2012 R2 and newer, you can right-click the Start button, and click System.
  2. For older versions of Windows, you can click Start, right-click the Computer icon and click Properties. Or find System in the Control Panel.
  3. Click Advanced system settings.
  4. On the Advanced tab, click the top Settings button.
  5. On the Advanced tab, click Change.
  6. Either turn off the pagefile or set the pagefile to be smaller than the cache disk. Don’t leave it set to System managed size. Don’t forget to click the Set button. Click OK several times.

VMware ESXi/vSphere


For VMware virtual machine, make sure the NIC is VMXNET3. E1000 is not supported and will affect performance.

If your Target Device is Windows 7 or Windows Server 2008 R2 with VMXNET3 NIC, install Microsoft hotfix http://support.microsoft.com/kb/2550978. If you forget to install it then the Provisioning Services Target Device Software will remind you. This hotfix is included in the Convenience Rollup.

After the hotfix is installed, view hidden adapters in Device Manager and delete any lingering (ghost) VMXNET3 NICs.

  1. At the command prompt, type the following lines, pressing ENTER after each line
    set devmgr_show_nonpresent_devices=1
    start devmgmt.msc
  2. Open the View menu, and click Show hidden devices.
  3. Expand Network adapters, and look for ghost NICs (grayed out). If you see any, remove them.

SATA Controller

Provisioning Services does not support the SATA Controller that became available in hardware Version 10. Change the CD/DVD Drive to IDE instead of SATA.

Then remove the SATA Controller.


Ensure that the ESXi hosts have NTP enabled.


After creating the vDisk, follow the instructions at http://www.jariangibson.com/provisioning-services-6-black-screen-issue/ to clear any DHCP address in the vDisk.

Slow Boot Times

Provisioning Services (PVS) Target Devices in VMware ESX boot slow intermittently after upgrading the ESX hosts from 5.0 to 5.1.

Citrix CTX139498 Provisioning Services Target Devices Boot Slow in ESX 5.x: Use the following command to disable the NetQueue feature on the ESX hosts:

esxcli system settings kernel set -s netNetqueueEnabled -v FALSE


  1. Hyper-V Target Devices should be a Generation 1 virtual machine. Generation 2 support is available in Provisioning Services 7.8 and newer.
  2. If Generation 1, each Hyper-V Provisioning Services Target Device must have a Legacy network adapter.
  3. Give the Legacy Network Adapter a Static MAC address. If you leave it set to all zeros then VMM will generate one once the VM is deployed.
  4. When you reopen the virtual machine properties there will be a Static MAC address.
  5. Set the Action to take when the virtualization server stops to Turn off virtual machine. This prevents Hyper-V from creating a BIN file for each virtual machine.
  6. To set a VLAN, either create a Logical Network and Network Site.
  7. Or use Hyper-V Manager to set the VLAN on each virtual machine NIC.

Antivirus Best Practices

Citrix’s Recommended Antivirus Exclusions

Citrix Blog Post Citrix Recommended Antivirus Exclusions: the goal here is to provide you with a consolidated list of recommended antivirus exclusions for your Citrix virtualization environment focused on the key processes, folders, and files that we have seen cause issues in the field:  💡

  • Set real-time scanning to scan local drives only and not network drives
  • Disable scan on boot
  • Remove any unnecessary antivirus related entries from the Run key
  • Exclude the pagefile(s) from being scanned
  • Exclude Windows event logs from being scanned
  • Exclude IIS log files from being scanned

See the Blog Post for exclusions for each Citrix component/product including: StoreFront, VDA, Controller, and Provisioning Services. The Blog Post also has links to additional KB articles on antivirus.


Symantec Endpoint Protection



Sophos  💡 

Sophos Anti-Virus for Windows 2000+: incorporating current versions in a disk image, including for use with cloned virtual machines: This procedure will make sure that the produced target/cloned computers:

  • Get their distinct identity with Enterprise Console, under which they can be subsequently managed.
  • Have the desired version of Sophos Anti-Virus already installed and configured on the created image.



CTX217997 BSOD Error: “STOP 0x0000007E CVhdMp.sys with Kaspersky antivirus: install Kaspersky Light Agent using the /pINSTALLONPVS=1 switch.  đź’ˇ

Boot ISO

You can create a Provisioning Services boot ISO for your Target Devices. This is an alternative to PXE.

  1. On the Provisioning Services server, run Provisioning Services Boot Device Manager.
  2. In the Specify the Login Server page, add the IP addresses of up to four Provisioning Services servers. Click Next.
  3. In the Set Options page, check the box next to Verbose Mode, and click Next.
  4. In the Burn the Boot Device page, do not click Burn. If you do then you will have a very bad day. Instead, look in the Boot Device section, and change it to Citrix ISO Image Recorder. Then you can click Burn.
  5. Save the iso and upload it to a datastore or VMM library.
  6. You can now configure your Target Devices to boot from this ISO file.

Disable Network Offload

Set the following registry key:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters\
    DWORD = DisableTaskOffload
    Value: “1”

Also see Ingmar Verheij Citrix PVS: Optimize endpoint with PowerShell: The script applies a number of best practices to optimize the performance of the PVS endpoint.  💡

Target Device Software 7.13 Installation

Do the following on the master VDA you intend to convert to a vDisk. Try not to install this while connected using RDP or ICA since the installer will disconnect the NIC.

  1. Your Target Device might have ghost NICs. This is very likely to occur when using VMXNet3. Follow http://support.citrix.com/article/CTX133188 to view hidden devices and remove ghost NICs.
  2. Go to the downloaded Provisioning Service 7.13, and run PVS_Device_x64.exe.
  3. If you are running XenApp/XenDesktop 7.6 LTSR, then you’ll want Provisioning Services 7.6.4 instead of Provisioning Services 7.13. The install instructions are essentially the same.
  4. In the Welcome to the Installation Wizard for Citrix Provisioning Services Target Device x64 page, click Next.
  5. In the License Agreement page, select I accept, and click Next.
  6. In the Customer Information page, click Next.
  7. In the Destination Folder page, click Next.
  8. In the Ready to Install the Program page, click Install.
  9. In the Installation Wizard Completed page click Finish.
  10. The Imaging Wizard launches. First review the following tweaks. Then proceed to converting the Master Image to a vDisk.

Target Device Software Tweaks

Prevent Drive for Write Cache

From Carl Fallis at Move writecache file to arbitary drive at Citrix Discussions: the driver that determines which partition to place the local cache searches for a file named: {9E9023A4-7674-41be-8D71-B6C9158313EF}.VDESK.VOL.GUID in the root directory. If the file is found it will not place the write cache on that disk.

Excessive Retries

If VMware vSphere, make sure the NIC is VMXNET3.

From Carl Fallis at Citrix Discussions and CTX200952 –High Amount of Retries Shown when Using Private Mode or Maintenance Version in PVS 7.6: Creating an image with 4 vCPU takes hours. With 2 vCPU’s, it’s completed in a few minutes.

The workaround for excessive retries in PVS 7.6 is to add the following registry key in the target device to reduce the number of threads used:

  • HKLM\SYSTEM\CurrentControlSystem\Services\Bnistack\Parameters
    • IosRequestThreads (DWORD) = try 2 and if the retries persist try 1

This has to be added while in private mode and you must reboot for this is take effect.

Computer Name

From Citrix Discussions: what happens is if the name cannot be retrieved from the bootstrap then the name defaults to the mac address.  You can force the target to ask again for the target’s machine name by setting the following registry key in the registry.

  • HKLM\System\CurrentControlSet\services\bnistack\Parameters  (you may have to create the Parameters key if it is not already created)
  • EnableGetComputerName DWORD 1  (default is 0 or disabled)

Even if you are not getting the Mac address for the target name and getting something different I would use this key to enable the extra processing on the target to get the targets name. You are correct, this should be turned on by default.  I will get it changed in the next release.

From http://discussions.citrix.com/topic/349911-pvs-71-device-name-in-pvs-console-in-uppercase-booted-vm-is-lowercase/#entry1806121: So by default we set all names to lower case, I have no idea why, it is historical for some unexplained reason.  If you want the name to be left alone use the following registry key:

From the target machine, open the registry Editor and browse to the following key while in Private mode or on a maintenance device:


Create a new key called ‘Parameters’ if doesn’t already exist.

Create a DWORD value in the ‘Parameters’ key called “TcpipHostnameNoConversion” and set the value to 1

Cache Disk Initialization Timeout

From http://discussions.citrix.com/topic/347399-pvs-61-caching-on-server-instead-of-a-client-hard-drive and Citrix Knowledgebase article – Write Cache Set to Provisioning Services Target Device Falls Back to Server: we have seen that it may take longer for the drives to initialize and by increasing the time and the number of retries the local hard drive can be accessed.  You can increase this by using the following registry keys:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\bnistack\parameters
    • WcHDInitRetryNumber DWORD  50-200 default is 150 I would set this to 200
    • WcHDInitRetryIntervalMs DWORD  50-500 default 100 number of ms to wait between retries, I would bump this one up to 300-500

Target Device Time Zone

CTX200188 Citrix Provisioning Services 6.1.21 and Citrix Provisioning Service 7.1.3 Target Time Zone Changes: the target devices request the time zone information from the Citrix Provisioning Services Server at boot time and set the time zone to the connected Citrix Provisioning Services server. If the time zone has a successful process, they execute the following command:
w32tm /resync /nowait

To disable the target device from using the time zone of the Citrix Provisioning Services server, set the following registry key in the vDisk image. The values must be modified in the registry of the master image to take effect during boot time.

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Bndevice\Parameters
  • Name: DisableTimeZone
  • Type: DWORD
  • Value: 1

Hide Provisioning Services Icon

From http://danielruiz.org/2013/11/11/xenapp-6-5-full-desktop-hide-pvs-system-tray/:

After researching the web a bit, I came across this HKLM key from Jack Cobben described in his blog Hide Virtual Disk Tray Icon where it simply stated to add the reg hive below.


  • “ShowIcon” (DWORD) = 0

This however will disable to all users, even Admins, and I wanted to be able give administrators the option to see the icon.

Solution: Apply the HKCU key below to your profile solution based on Group membership (Group Policy Preferences > Item Level Targeting):

Windows Registry Editor Version 5.00


  • “ShowIcon”=dword:00000000

Once that is in place the icon will go away.

Related Pages

51 thoughts on “PvS Master Device – Preparation”

  1. Very useful, as usual. Question: in the past, I used to install hypervisor tools, then PVS Target Device and only after I would install VDA. By the steps above, I understand now you can install PVS Target Device as the last part? Is this something related to the changes that don’t require disconnection of network card in order to update target device or nothing related?

    1. Does VDA affect the NIC? Target Device software should be installed after all other NIC affecting software.

  2. Great articles, Carl. I have run into a problem as I get the “Failed to Convert! error after attempting to convert the vDisk. I believe I have things set up OK and have tried this twice, same result. All good up until this. Does this clue help to explain what I’m missing?

    Here is part of the log:
    Gathering Volume Shadow Copy Writer metadata…
    Ensuring shadow storage association…
    Getting shadow storage associations…
    Found 0 shadow storage associations for volume \\?\Volume{8e6a3e7e-0000-0000-0000-100000000000}\.
    Adding shadow storage association…
    Adding volume \\?\Volume{8e6a3e7e-0000-0000-0000-100000000000}\ to snapshot…
    Ensuring shadow storage association…
    Getting shadow storage associations…
    Found 0 shadow storage associations for volume \\?\Volume{8e6a3e7e-0000-0000-0000-501f00000000}\.
    Adding shadow storage association…
    Adding volume \\?\Volume{8e6a3e7e-0000-0000-0000-501f00000000}\ to snapshot…
    Preparing for backup…
    Gathering writer status…
    Committing shadow copies…
    Gathering writer status…
    Failed to read registry value \??\Volume{000169b1-0000-0000-0000-501f00000000} from SYSTEM\MountedDevices. The system cannot find the file specified. (0x00000002)


  3. Hi Carl

    Since we already have the required DHCP Options configured for another System, I opted using “boot ISO”. However I am not getting through “Download tsbbdm.bin x.x.x.x _ failed.

    I have all required ports opened on the PVS and I only have a single Server.

    Anywhere else I should check?


      1. Thanks Thouhgt I already had it opened, but unfortunately it wasn’t.

        I am now getting “Login request time out”. I’ve checked “bootstrap” configuration, the time out are set to 5000 and 30000 respectively.

  4. Terrific site.

    I have multiple Citrix Device Collections that have different workloads. I have images that have 4GB, 6GB and 10GB cache RAM. Not sure if I have undersized\oversized the cache RAM.

    Is there a way to determine the correct size of the cache RAM for “cache in device RAM with overflow on hard disk”?

    Is there a way to determine how much of the vm’s RAM is utilized by the PVS cache RAM (if it doesn’t overflow to disk)?

  5. I am confused about “cache” and pagefile… I am setting up 7.8 I have an a server with 32 gigs of ram, no C: drive and a 15 gig D: drive where I hardcode an 8 gig pagefile and the event logs. On the console, I have option, cache in device ram with overflow on hard disk.. The default is 64 MEGs….I have it set to 512 meg. I am not sure the amount to put in there.? Sorry for the dumb question, but this cache is different than the pagefile? I got confused reading the beginning of this. And I have been trying to find an explanation on this. When I turn it on, It shows in VMconsole, host mem 5 gig.. guest mem% 75 to 95 %… Then it starts slowly dropping That is with no users logged in just starting it up and letting it sit there.. If I log a user in, the guestmem % goes up a minute then drops… The other day I watched it drop to 0 percent after 10 minutes with 1 user logged in. Generally our handbuilt virtual Citrix servers with a full load of people working on them say 15 to 25%. I am worried about that thing hopping up to 95 percent and staying there for 10 minutes… Any help? PVS server has 16 GIGs of ram on it. Right now with 1 user logged in doing nothing 15 minutes after boot it is sitting at 3 % and host memory jumped to 7 gig adding the user but I opened a couple of apps.

    1. Windows cache and PvS cache are different. When a machine makes changes to the files, PvS needs to write those changes somewhere. With PvS memory cache, it writes the changes to memory. If PvS memory cache is full, it writes them to disk.

      Windows has both memory for apps, and memory caching for files. Memory for apps overflows to the pagefile. Memory caching for files will use whatever memory is not being used by applications.

    1. If pagefile is on C:, then PvS automatically moves to the write cache disk. If pagefile is on a different disk, then PvS should leave it on that disk.

  6. Hi Carl

    Thanks for the details.

    Can we have PVS server in ESX 5.5 where as all streamed worker servers(750 in total, 600 W2K3, 100 W2k8 R2, 50 W2K12 R2) on HyperV 2012 R2? Currently we are streaming worker servers with HyperV legacy NIC. Will there be any problem with Cross platform infrastructure?

    1. I’m not aware of any restriction on that configuration. There’s no real connection to the hypervisor other than the drivers inside the vDisks and the hypervisor connection when creating more VMs. The PvS servers themselves have no awareness of the hypervisor they run on. The only consideration is PXE if they are on separate networks.

  7. Hi Carl,

    I am unable to image a new Win7 generation 1 VM as I getting. imaging wizard did not restart error after i changed the VM boot to Network post 1st reboot. Getting event ID 7026 The following boot start or network driver failed to load: bnistack. VM is virtualized on Hyper-V and using SCVMM 2012 to create VMs.

    Any Help ?

  8. Carl any recommendations on SCCM and 2012R2 for the master and worker servers? 2008 seems to work fine, been having issues with 2012.

  9. Dear Carl, Xendesktop Wizard creates vms with automatic mac addresses (instead of manual) on vsphere, do you think this is a problem, lets say i migrate the vdis to another esx-host and the mac changes!?

    1. Mac won’t change unless you move it to another VCenter. Hyperv has the MAC change problem but I almost never see it on vSphere.

  10. Finishing up a deployment and just noticed that the on XA server, which is 2012 R2 has a notification that maintenance is running.

    Did a little research and seems like this is an automatic task that runs, but in this type of environment is it really necessary to have that enabled? I would think not, and doesn’t seem like it will break anything if disabled.

    Wanted to see what your opinion was on this?

    1. There are various optimization guides you’re welcome to follow. However, I’ve heard that many of them only make minor improvements to performance or density.

  11. Hi,

    Our vDisk is using standard mode and caches on device’s Hard Disk. Where should I be setting the pagefile for best performance?

  12. Hi Carl, I’m just about to do my first 7.6 deployment, so have been doping some prep reading etc. One thing that stands out to me is there is no mention of the “Prepare Server For Imaging or Provisioning” process that you had to launch from the Roles Manager in XA 6.5.

    Is this now taken care of by the Imaging Wizard?

        1. I’m not aware of any document. When installing the VDA, there’s the option to create a master image. When you use PvS or MCS to clone the image, the components handle registration automatically.

  13. Hi Carl, thanks for all the very helpful info. Why do you recommend the vda Installation directly in the vdisk after PVS Target?

    Thanks a lot.

    1. I’m not sure it matters. Sometimes I fully build a VDA machine and only later convert it to PvS. Other times I convert to PvS as soon as possible. There’s no specific install order for TD Software vs VDA.

  14. Carl,
    What is your preferred option PXE boot or ISO? ISO obviously boots up quicker than PXE. I’m interested to know what your thoughts are on the two options.


    1. If everything’s on one VLAN then PXE is easier. If not, then need ISO or BDM. The XenDesktop Setup Wizard configures BDM for you.

      1. Carl,
        Thanks for the info and this article. Do you know if one might perform better or if Citrix recommends one over the other?

        1. I’m not aware of any performance difference. Once the boostrap is loaded they should be the same.

          The simplicity of PXE is generally recommended since it defeats VMware’s accusations of Citrix’s complexity. But it’s not always practical.

  15. Carl,

    Excellent Documentation. One thing I added was a Powershell script to mine if you desire to leave al of your machines powered up:

    Set-BrokerDesktopGroup “Desktop Group Name” -PeakBufferSizePercent 100
    Set-BrokerDesktopGroup “Desktop Group Name” -OffPeakBufferSizePercent 100

  16. Carl,

    Excellent guide. Any workaround for the Windows 7 Target Device installation and VMXNet3 error ?The referenced KB2550978 has been outdated/replaced with new updates. Removing the VMXNet3 and adding E1000 does not solve the problem as well.

  17. VERY helpful site, thanks!

    Small remark, hiding the PVS icon on a user level should be done with following registry key:
    Key path SOFTWARE\Citrix\ProvisioningServices\StatusTray
    Value name ShowIcon
    Value type REG_DWORD
    Value data 0x0 (0)

Leave a Reply