PvS Master Device – Preparation

Last Modified: Apr 23, 2019 @ 5:18 pm

Navigation

This article applies to all 7.x versions of Citrix Provisioning, including Current Release 1903, LTSR 7.15.15 (aka LTSR 7.15 CU4), and LTSR 7.6.8 (aka LTSR 7.6 CU7).

ūüí° = Recently Updated

Change Log

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.

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 Citrix Provisioning will be unable to move it to the cache disk. This causes Citrix Provisioning 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

VMXNET3

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

PCI.sys hotfix – 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 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

Citrix Provisioning 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 Provisioning Services 6 Black Screen Issue to clear any DHCP address in the vDisk.

Slow Boot Times

Citrix Provisioning 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

  1. Generation 2 support is available in Citrix Provisioning 7.8 and newer.
  2. If Generation 1, each Hyper-V Citrix Provisioning Target Device must have a Legacy network adapter. Legacy NIC supports Network Boot, while the Synthetic NIC does not.
  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. The Blog Post also has links to additional KB articles on antivirus.

Symantec Endpoint Protection

http://blogs.citrix.com/2012/06/04/how-to-prepare-a-citrix-provisioning-services-target-device-for-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.

Kaspersky

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 Citrix Provisioning boot ISO for your Target Devices. This is an alternative to PXE.

  1. On the Provisioning server, run Citrix Provisioning Boot Device Manager.
  2. In the Specify the Login Server page, add the IP addresses of up to four Provisioning 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 on the Target Device:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters\
    • DisableTaskOffload (DWORD) =¬†1

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

Target Device Software Installation

The Target Device Software version must be the same or older than the Citrix Provisioning server version.

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. Ghost NICs РYour Target Device might have ghost NICs. This is very likely to occur on Windows 7 and Windows 2008 R2 VMs when using VMXNet3. Follow CTX133188 Event ID 7026 РThe following boot-start or system-start driver(s) failed to load: Bnistack to view hidden devices and remove ghost NICs.
  2. Windows 10 1709 –¬†¬†there are two known issues: (source =¬†CTX229052¬†Windows 10 Fall Creators Update (v1709) ‚Äď Citrix Known Issues)
    • Target Device uninstall hangs on Windows 10 v1709.¬†Perform in-place upgrade of Target Device, rather than uninstalling.
    • Windows 10 x86 v1709 (not x64) cannot boot from vDisk in private mode.¬†There is no solution or work around at this time.
  3. Go to the downloaded Citrix Provisioning, and run PVS_Device_x64.exe.
  4. If you see a requirements window, then click Install to install CDF 64-bit.
  5. In the Welcome to the Installation Wizard for Citrix Provisioning Target Device x64 page, click Next.
  6. In the License Agreement page, select I accept, and click Next.
  7. In the Customer Information page, click Next.
  8. In the Destination Folder page, click Next.
  9. In the Ready to Install the Program page, click Install.
  10. In the Installation Wizard Completed page click Finish.
  11. The Imaging Wizard launches. First review the following tweaks. Then proceed to converting the Master Image to a vDisk.

Target Device Software Tweaks

Asynchronous I/O

Citrix Provisioning 1808 and newer supports Asynchronous I/O to improve performance. It’s disabled by default because it uses more memory. For details, see¬†Improved performance with asynchronous I/O streaming at What’s New¬†at Citrix Docs. The registry value is configured inside the vDisk.

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVhdMp\Parameters
    • DWORD¬†AsyncIO =¬†1

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 Citrix Provisioning 7.6 is to add the following registry key in the target device to reduce the number of threads used:

  • HKLM\SYSTEM\CurrentControlSet\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\Parameters (Create a new key called ‘Parameters’ if doesn’t already exist)
    • TcpipHostnameNoConversion¬†(DWORD) = 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 Server at boot time and set the time zone to the connected Citrix Provisioning 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 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
    • DisableTimeZone (DWORD) =¬†1

Hide Citrix Provisioning Icon

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

From Jack Cobben Hide Virtual Disk Tray Icon: Add the reg value below:

  • HKLM\Software\Citrix\ProvisioningServices\StatusTray
    • ShowIcon (DWORD) = 0

This however will disable to all users, even Admins. Solution: Apply the HKCU key below based on Group membership (Group Policy Preferences > Item Level Targeting):

  • HKEY_CURRENT_USER\SOFTWARE\Citrix\ProvisioningServices\StatusTray
    • ShowIcon (DWORD)¬†=¬†0

Once that is in place the icon will go away.

Related Pages

134 thoughts on “PvS Master Device – Preparation”

  1. Windows released a patch at the end of January that fixed the Server 2019 and Windows 10 1809 incompatibility issues. I’ve tested this in my environment and no longer get the pagefile message. Just thought I’d post about it so others who have been waiting for the fix can start testing.

Leave a Reply