- PXE Tester
- Convert to vDisk – Imaging Wizard Method
- Boot from Network or ISO
- Join Device to Domain
- Boot from vDisk
- Save Clean Image
- Seal the vDisk
- Defrag the vDisk
- Standard Image Mode
- vDisk High Availability
- Create Cache Disk – vSphere
- Create Cache Disk – Hyper-V
- Verify Write Cache Location
💡 = Recently Updated
PXE Tester 💡
If you will use PXE, download CTX217122 PXEChecker to the master machine.
The TFTP portion won’t work unless the client-side firewall is disabled.
To verify functioning PXE, run PXEChecker, and Run Test in Legacy BIOS mode. Or you can do a BDM Test (see the article for details).
Convert to vDisk – Imaging Wizard Method
The Imaging Wizard connects to a Provisioning Services server to create a vDisk and a device. Once that’s done, the machine reboots and the conversion process begins. You can also do all of these steps manually.
- In the Provisioning Services Console, create a Store to hold the new vDisk.
- In the Provisioning Services Console, create a device collection to hold the new Target Device. This could be a device collection for Updater machines. The imaging wizard will ask you to enter the machine name for a new target device.
- If the Imaging Wizard is not already running, launch it from the Start Menu.
- In the Welcome to the Imaging Wizard page, click Next.
- In the Connect to Farm page, enter the name of a Provisioning Services server, and click Next.
- In the Imaging Options page, click Next to create a new vDisk. Alternatively, you can select Create an image file.
- In the Add Target Device page, enter a new unique name for the Target Device.
- Select a Collection and click Next.
- In the New vDisk page, enter a name for the vDisk.
- Select a Store and click Next. Leave it set to Dynamic and VHDX.
- In the Microsoft Volume Licensing page, select None, and click Next. We’ll configure this later when switching to Standard Image mode.
- In the What to Image page, leave it set to Image entire boot disk, and click Next.
- In the Optimize Hard Disk for Provisioning Services page, click Next.
- Shown below are the optimizations it performs.
- Then click Create.
- Don’t reboot yet. Review the following issues to determine if they apply. Then configure the virtual machine to boot from the network (PXE), or boot from an ISO as detailed soon.
- When asked to reboot, click No to shutdown the machine. This gives you time to reconfigure the machine to boot from the network or ISO.
- If you look in the Provisioning Services console, you will see a new vDisk in Private Image mode. Currently there is nothing in this vDisk.
- In a Device Collection you will see a new Target Device record that is configured to boot from Hard Disk, and is assigned to the new vDisk.
Boot from Network or ISO
- Power off the Target Device.
- If PXE, make sure the target device is on the same network as the Provisioning Server. Or configure DHCP options 66 & 67.
- For vSphere, edit the settings of the virtual machine and on the VM Options tab, in the Boot Options section, check the box to Force BIOS Setup.
- If booting from an ISO, connect the virtual machine’s CD to the PvSBoot.iso. Make you check Connect At Power On.
For Hyper-V, in VMM, edit the virtual machine properties, switch to the Hardware Configuration page, and in the Virtual DVD drive page, assign the ISO from the library.
- If vSphere, power on the virtual machine.
- If PXE booting, on the Boot tab, move Network boot to the top.
If Hyper-V, on the Hardware Configuration > Firmware page move PXE Boot to the top.
- If booting from a boot ISO, move CD-ROM Drive to the top.
If Hyper-V, on the Hardware Configuration > Firmware page, move CD to the top.
- If Hyper-V, power on the virtual machine.
- Once the machine has booted to Provisioning Services (PXE or ISO), login, and the conversion wizard will commence. It will take several minutes so be patient.
- When done, click Done. It might prompt you to reboot. Reboot it, log in, and then shut it down.
Master Target Device – Join to Domain
Provisioning Services must learn the password of the Target Device’s Active Directory computer account. To achieve this, use the Provisioning Services Console to create or reset the computer account.
Note: Creating, Resetting, and Deleting Target Device computer objects in Active Directory must be done from inside the Provisioning Services Console. Do not use Active Directory Users & Computers to manage the Target Device computer account passwords. Provisioning Services will automatically handle periodic (default 7 days) changing of the computer passwords.
- In the Provisioning Services Console, right-click the Target Device, expand Active Directory, and click Create Machine Account.
- Select the correct OU in which the Active Directory computer object will be placed, and click Create Account.
- Then click Close.
Boot from vDisk
- In the Provisioning Services Console, go to the Device Collection.
- Right-click the new device, and click Properties.
- On the General tab, set Boot from to vDisk.
- Restart the Target Device.
- At this point it should be booting from the vDisk. To confirm, by your clock is an icon that looks like a disk. Double-click it.
- The General tab shows it booting from vDisk and the Mode = Read/Write.
vDisk – Save Clean Image
If you have not yet installed applications on this image, you can copy the VHD file and keep it as a clean base image for future vDisks.
- If this vDisk is in Private Image mode, first power off any Target Devices that are accessing it.
- Then you can simply copy the VHD file and store it in a different location.
If you later need to create a new vDisk, here’s how to start from the clean base image:
- Copy the clean base image VHD file to a new folder.
- Rename the file to match your new Image name.
- In the Provisioning Services Console, create a new Store, and point it to the new folder.
- Give the new Store a name.
- On the Servers tab, select all Provisioning Services servers.
- On the Paths tab, enter the path to the new folder. Click OK.
- Click OK when asked to create the default write cache.
- Right-click the new store and click Add or Import Existing vDisk.
- Click Search.
- Click OK if prompted that a new property file will be created with default values.
- Click Add, click OK, and then click Close.
- You can now assign the new vDisk to an Updater Target Device and install applications.
This only needs to be done once. More information at http://support.citrix.com/article/CTX128276.
- Open Provisioning Services Server: In the Console, right-click on the virtual disk, and select Properties.
- Click on the Microsoft Volume Licensing tab, and set the licensing option to None.
- Start the Updater device off vDisk in Private Image mode.
- Rearm the system for both Windows and Office, one after the other.
- For Windows Vista, 7, 2008, and 2008R2: Run cscript.exe slmgr.vbs -rearm
- For Office (for 64-bit client): C:\Program Files(x86)\Common Files\Microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE
- For Office (for 32-bit client): C:\Program Files\Common Files\Microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE
- A message is displayed to reboot the system, DO NOT REBOOT- Instead, run sealing tasks and then shut down the Target Device.
Note: After streaming the vDisk to multiple Target Devices, Administrators can validate that the KMS configuration was successful by verifying that the CMID for each device is unique.
- For Windows Vista, 7, 2008, and 2008R2: Run cscript.exe slmgr.vbs –dlv
- For Office: Run C:\Program Files\Microsoft Office\Office14\cscript ospp.vbs /dcmid
Also see Citrix Blog Post Demystifying KMS and Provisioning Services
And Ingmar Verheij Citrix PVS: Enabling KMS licensing on a vDisk
vDisk – Seal
Do the following sealing steps every time you switch from Private Image mode to Standard Image mode.
- Run antivirus sealing tasks.
- Sophos: refer to http://www.sophos.com/en-us/support/knowledgebase/12561.aspx.
- Symantec: Run a full scan and then run the Virtual Image Exception tool – http://www.symantec.com/business/support/index?page=content&id=TECH173650
- Symantec: see the Provisioning Services script at http://www.symantec.com/business/support/index?page=content&id=TECH123419
- Trend Micro: See VDA > Antivirus for links to Trend Micro documents.
- Citrix Blog Post Sealing Steps After Updating a vDisk contains a list of commands to seal an image for Provisioning Services.
- Citrix Blog Post PVS Target Devices & the “Blue Screen of Death!” Rest Easy. We Can Fix That has a reg file to clear out DHCP configuration. 💡
- Shut down the target device.
Defrag the vDisk
In the Citrix Blog Post Size Matters: PVS RAM Cache Overflow Sizing, Citrix recommends defragmenting the vDisk.
- While still in Private Image mode, right-click the vDisk, and click Mount vDisk.
- In File Explorer, find the mounted disk, right-click it, and click Properties.
- On the Tools tab, click Optimize.
- Highlight the mounted drive and click Optimize.
- When done, back in Provisioning Services Console, right-click the vDisk, and click Unmount vDisk.
Standard Image Mode
- In the Provisioning Server Console, go to the vDisk store, right-click the vDisk, and click Properties.
- On the General tab, change the Access Mode to Standard Image.
- Set the Cache Type to Cache in device RAM with overflow on hard disk. Don’t leave it set to the default cache type or you will have performance problems. Also, every time you change the vDisk from Standard Image to Private Image and back again, you’ll have to select Cache in device RAM with overflow on hard disk.
- Change the Maximum RAM size to a higher value. For virtual desktops, set it to 512 MB or larger. For Remote Desktop Session Hosts, set it to 4096 MB or lager. Make sure your Target Devices have extra RAM to accommodate the write cache.
- On the bottom of the General tab is a new checkbox to disable cleanup of cached secrets. By default, PvS 7.12 and newer will delete any cached credentials. This behavior can be disabled by checking the box.
- On the Microsoft Volume Licensing tab, select Key Management Service, and click OK. If you get an error, it’s because your service account is not a local administrator on the Provisioning Server. PvS mounts the vDisk, clears the licensing, and unmounts it. Only administrators can do this.
For more information about KMS and Provisioning Services, see Citrix PVS: Enabling KMS licensing on a vDisk
vDisk – High Availability
- Magnar Johnsen – Citrix PVS – DFS replication configuration script
- In the Provisioning Server Console, right-click the vDisk, and click Load Balancing.
- Ensure Use the load balancing algorithm is selected. Check the box next to Rebalance Enabled. Click OK.
- Go to the physical vDisk store location (e.g. D:\Win2016Common) and copy the .vhd and .pvp vDisk files for the new vDisk. Do not copy the .lok file.
- Go to the same path on the other Provisioning Server and paste the files. You must keep both Provisioning Servers synchronized.
Another method of copying the vDisk files is by using Robocopy:
Robocopy D:\vDisks \\pvs02\d$\vDisks *.vhd *.avhd *.pvp /b /mir /xf *.lok /xd WriteCache /xo
- In the Provisioning Service Console, right-click the vDisk, and click Replication Status.
- Blue indicates that the vDisk is identical on all servers. If they’re not identical then you probably need to restart the Citrix PvS Stream Service and the Citrix PvS SOAP Service. Click Done when done.
Cache Disk – vSphere
Remove the original C: drive from the Master Target Device, and instead add a cache disk.
- In vSphere Client, right-click the Master Target Device, and click Edit Settings.
- Select Hard disk 1, and click the x icon. Click OK.
- Edit the Settings of the virtual machine again.
- On the bottom, click New device, and select New Hard Disk.
- Then click Add.
- This is your cache overflow disk. 20 GB is probably a good size for session hosts. For virtual desktops this can be a smaller disk (e.g. 5 GB). Note: the pagefile must be smaller than the cache disk.
- Expand the newly added disk, and select Thin provision if desired. Click OK when done.
- Configure group policy to place the Event Logs on the cache disk.
- Boot the Target Device and Verify the Write Cache Location.
Cache Disk – Hyper-V
Remove the original C: drive from the Target Device and instead add a cache disk.
- Edit the settings of your Provisioning Services master virtual machine and remove the existing VHD.
- Make a choice regarding deletion of the file.
- Create a new Disk.
- This is your cache overflow disk. 15-20 GB is probably a good size for session hosts. For virtual desktops this can be a smaller disk (e.g. 5 GB). Note: the pagefile must be smaller than the cache disk. Click OK when done.
- Configure group policy to place the Event Logs on the cache disk.
Verify Write Cache Location
- Boot the target device virtual machine and ensure everything is working.
- Open the Virtual Disk Status window by clicking the PvS disk icon in the system tray.
- Make sure Mode is set to Read Only and Cache type is set to device RAM with overflow on local hard drive.
- If Cache type says server, then follow the next steps:
- For the cache disk, only MBR is supported. GPT will not work.
- The cache disk must be a Basic disk, not Dynamic.
- Format the cache disk with NTFS.
- Make sure the pagefile is smaller than the cache disk. If not it will fail back to server caching.
- After fixing the problem and rebooting, the Cache Type should be device RAM with overflow on local hard drive.
- To view the files on the cache disk, go to Folder Options, and deselect Hide protected operating system files.
- On the cache disk, you’ll see the pagefile, and the vdiskdiff.vhdx file, which is the overflow cache file.