Navigation
- General Preparation
- Pagefile
- VMware ESXi
- Hyper-V
- Antivirus
- Boot ISO
- Disable Network Offload
- Install Target Device Software
- Target Device Software Tweaks – excessive retries, computer name, hide PvS icon
General Preparation
Citrix CTX131611 – Known Hardware Related Provisioning Services Issues
- Build the VDA like normal.
- Update VMware Tools.
- Join the machine to the domain.
- Citrix CTX128058 Recommended Operating System Patches for Provisioned Windows Targets contains a list of recommended hotfixes for Windows 2008 R2 and Windows 7.
Pagefile
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.
- Open System. In 2012 R2, you can right-click the Start button and click System.
- For older versions of Windows, you can click Start, right-click the Compter icon and click Properties. Or find System in the Control Panel.
- Click Advanced system settings.
- On the Advanced tab, click the top Settings button.
- On the Advanced tab, click Change.
- 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
VMXNet3
If your Windows 7 or Windows Server 2008 R2 Target Device is a VMware virtual machine 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.
After the hotfix is installed, view hidden adapters in Device Manager and delete any lingering (ghost) VMXNet3 NICs.
- At the command prompt, type the following lines, pressing ENTER after each line
set devmgr_show_nonpresent_devices=1 start devmgmt.msc
- Open the View menu and click Show hidden devices.
- 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.
NTP
Ensure that the ESXi hosts have NTP enabled.
DHCP
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
Hyper-V
- Every Hyper-V Target Device must be a Generation 1 virtual machine. Generation 2 is not supported.
- Each Hyper-V Provisioning Services Target Device must have a Legacy network adapter.
- 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.
- When you reopen the virtual machine properties there will be a Static MAC address.
- 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.
- To set a VLAN, either create a Logical Network and Network Site.
- Or use Hyper-V Manager to set the VLAN on each virtual machine NIC.
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 such as:
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.
More at Provisioning Services Antivirus Best Practices – http://support.citrix.com/article/CTX124185
For Symantec Endpoint Protection: http://blogs.citrix.com/2012/06/04/how-to-prepare-a-citrix-provisioning-services-target-device-for-symantec-endpoint-protection/.
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.
Boot ISO
You can create a Provisioning Services boot ISO for your Target Devices. This is an alternative to PXE.
- On the Provisioning Services server, run Provisioning Services Boot Device Manager.
- In the Specify the Login Server page, add the IP addresses of up to four Provisioning Services servers. Click Next.
- In the Set Options page, check the box next to Verbose Mode and click Next.
- 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.
- Save the iso and upload it to a datastore or VMM library.
- 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”
Target Device Software 7.6 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.
- 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.
- Go to the downloaded Provisioning Services 7.6 and in the Device folder run PVS_Device_x64.exe (or x86).
- In the Welcome to the Installation Wizard for Citrix Provisioning Services Target Device x64 page, click Next.
- In the License Agreement page, select I accept and click Next.
- In the Customer Information page, click Next.
- In the Destination Folder page, click Next.
- In the Ready to Install the Program page, click Install.
- In the Installation Wizard Completed page click Finish.
- The Imaging Wizard launches. First review the following tweaks. Then proceed to converting the Master Image to a vDisk.
Target Device Software Tweaks
Excessive Retries
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:
HKLM\System\CurrentControlSet\Services\Bnistack
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
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.
HKLM\Software\Citrix\ProvisioningServices\StatusTray
- “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
[HKEY_CURRENT_USER\SOFTWARE\Citrix\ProvisioningServices\StatusTray]
- “ShowIcon”=dword:00000000
Once that is in place the icon will go away.