PvS Master Device – Preparation

Last Modified: Oct 20, 2016 @ 7:48 am


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.


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, 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. 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 CTX124185 Provisioning Services Antivirus Best Practices:

  • Limit antivirus definition updates to the Target Device. Create a plan to upgrade the vDisk periodically.
  • Avoid scanning your disk write cache location regardless of where this file resides. In limited testing it has been observed that most scanners cannot detect a virus within this location because of their inherit design and the methods used to determine a virus.
  • Avoid scanning the BNDevice.exe process on the Target.
  • There are a few drivers that should be excluded from scanning in the <systemroot>\windows\system32\drivers directory. For Provisioning Server 6.0 or later exclude bnistack6.sys,CvhdBusP6.sys, CFsDep2 .sys
  • Avoid scanning these processes on the Provisioning Server: StreamService.exe, StreamProcess.exe and the soapserver.exe.



From http://blogs.citrix.com/2012/11/04/pvs-and-the-forgotten-antivirus-exclusions/:

A few recommended Server Side file exclusions.
C:\Windows\System32\drivers\CVhdBusP6.sys => (PVS 6.1)
C:\Windows\System32\drivers\CVhdBus2.sys => (PVS 5.6)
C:\Windows\System32\drivers\CFsDep2.sys => (PVS 5.6 and PVS 6.1)
C:\Program Files\Citrix\Provisioning Services\BNTFTP.EXE => (PVS 5.6 and PVS 6.1)
C:\ProgramData\Citrix\Provisioning Services\Tftpboot\ARDBP32.BIN => (PVS 5.6 and PVS 6.1)
D:\Store => ( i.e. local vdisk store)

A few recommended Server Side processes to be excluded.
C:\Program Files\Citrix\Provisioning Services\StreamService.exe => (All versions)
C:\Program Files\Citrix\Provisioning Services\StreamProcess.exe => (All versions)
C:\Program Files\Citrix\Provisioning Services\soapserver.exe => (All versions)

A few recommended Target Device exclusions.
C:\Windows\System32\drivers\bnistack.sys => (Only targets, Win2003/XP)
C:\Windows\System32\drivers\bnistack6.sys => (Only targets, 2008/Win7)
C:\Windows\System32\drivers\BNNF.sys => (Only targets)
C:\Windows\System32\drivers\BNNS.sys => (Only targets, Win2003/XP)
C:\Windows\System32\drivers\BNNS6.sys => (Doesn’t exist anymore with PVS6.1 Agent)
C:\Windows\System32\drivers\BNPort.sys => (Only targets)
C:\Windows\System32\drivers\CFsDep2.sys => (Only targets, Win2003/XP)
C:\Windows\System32\drivers\CVhdBusP52.sys => (Only targets, Win2003/XP)
C:\Program Files\Citrix\Provisioning Services\BNDevice.exe => (Only targets, 2008/Win7)
C:\Program Files\Citrix\Provisioning Services\TargetOSOptimizer.exe => (Only targets, 2008/Win7)

An even easier approach would be to exclude the complete Provisioning services folder.


Symantec Endpoint Protection




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.11 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.11 and run PVS_Device_x64.exe.
  3. In the Welcome to the Installation Wizard for Citrix Provisioning Services Target Device x64 page, click Next.
  4. In the License Agreement page, select I accept, and click Next.
  5. In the Customer Information page, click Next.
  6. In the Destination Folder page, click Next.
  7. In the Setup Type page, click Next. This installs support for Session Recording.
  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

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

42 thoughts on “PvS Master Device – Preparation”

  1. 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.

  2. 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)?

  3. 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.

  4. 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.

  5. 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 ?

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

  7. 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.

  8. 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.

  9. Hi,

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

  10. 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.

  11. 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.

  12. 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.

  13. 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

  14. 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.

  15. 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