PvS Master Device – Convert to vDisk

Last Modified: Sep 22, 2016 @ 4:23 pm


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

  1. In the Provisioning Services Console, create a Store to hold the new vDisk.
  2. 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.
  3. If the Imaging Wizard is not already running, launch it from the Start Menu.
  4. In the Welcome to the Imaging Wizard page, click Next.
  5. In the Connect to Farm page, enter the name of a Provisioning Services server and click Next.
  6. In the Imaging Options page, click Next to create a new vDisk. Alternatively, you can select Create an image file.
  7. In the Add Target Device page, enter a new unique name for the Target Device.
  8. Select a Collection and click Next.
  9. In the New vDisk page, enter a name for the vDisk.
  10. CSelect a Store and click Next. Leave it set to Dynamic and VHDX.
  11. In the Microsoft Volume Licensing page, select None and click Next. We’ll configure this later when switching to Standard Image mode.
  12. In the What to Image page, leave it set to Image entire boot disk and click Next.
  13. In the Optimize Hard Disk for Provisioning Services page, click Next.
  14. Shown below are the optimizations it performs.
  15. Then click Create.
  16. 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.
  17. 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.
  18. 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.

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

  1. Power off the Target Device.
  2. If PXE, make sure the target device is on the same network as the Provisioning Server. Or configure DHCP options 66 & 67.
  3. 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.
  4. If booting from an ISO, connect the virtual machine’s CD to the PvSBoot.iso.

    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.
  5. If vSphere, power on the virtual machine.
  6. 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.
  7. 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.
  8. If Hyper-V, power on the virtual machine.
  9. 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.
  10. 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.

  1. In the Provisioning Services Console, right-click the Target Device, expand Active Directory and click Create Machine Account.
  2. Select the correct OU in which the Active Directory computer object will be placed and click Create Account.
  3. Then click Close.

Boot from vDisk

  1. In the Provisioning Services Console, go to the Device Collection.
  2. Right-click the new device and click Properties.
  3. On the General tab, set Boot from to vDisk.
  4. Restart the Target Device.
  5. 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.
  6. 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.

  1. If this vDisk is in Private Image mode, first power off any Target Devices that are accessing it.
  2. 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:

  1. Copy the clean base image VHD file to a new folder.
  2. In the Provisioning Services Console, create a new Store and point it to the new folder.
  3. Give the new Store a name.
  4. On the Servers tab, select all Provisioning Services servers.
  5. On the Paths tab, enter the path to the new folder. Click OK.
  6. Click OK when asked to create the default write cache.
  7. Right-click the new store and click Add or Import Existing vDisk.
  8. Click Search.
  9. Click OK if prompted that a new property file will be created with default values.
  10. Click Add.
  11. 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.

  1. Open Provisioning Services Server: In the Console, right-click on the virtual disk and select Properties.
  2. Click on the Microsoft Volume Licensing tab and set the licensing option to None.
  3. Start the Updater device off vDisk in Private Image mode.
  4. Rearm the system for both Windows and Office, one after the other.
    1. For Windows Vista, 7, 2008, and 2008R2: Run cscript.exe slmgr.vbs -rearm
    2. For Office (for 64-bit client): C:\Program Files(x86)\Common Files\Microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE
    3. For Office (for 32-bit client): C:\Program Files\Common Files\Microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE
  5. 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 Demystifying KMS and Provisioning Serviceshttp://blogs.citrix.com/2014/05/01/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.

  1. Run antivirus sealing tasks.
  2. Citrix Blog Post Sealing Steps After Updating a vDisk contains a list of commands to seal an image for Provisioning Services.
  3. 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.  💡
  4. 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.

  1. While still in Private Image mode, right-click the vDisk and click Mount vDisk.
  2. In Explorer, find the mounted disk, right-click it and click Properties.
  3. On the Tools tab, click Optimize.
  4. Highlight the mounted drive and click Optimize.
  5. When done, back in Provisioning Services Console, right-click the vDisk and click Unmount vDisk.

Standard Image Mode

  1. In the Provisioning Server Console, go to the vDisk store, right-click the vDisk and click Properties.
  2. On the General tab, change the Access Mode to Standard Image.
  3. 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.
  4. 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.
  5. 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.

For more information about KMS and Provisioning Services, see Citrix PVS: Enabling KMS licensing on a vDisk: http://www.ingmarverheij.com/citrix-pvs-enabling-kms-licensing-on-a-vdisk/.

vDisk – High Availability

  1. Citrix PVS – DFS replication configuration scripthttp://virtexperience.com/2012/09/19/citrix-pvs-dfs-replication-configuration-script/
  2. In the Provisioning Server Console, right-click the vDisk and click Load Balancing.
  3. Ensure Use the load balancing algorithm is selected. Check the box next to Rebalance Enabled. Click OK.
  4. Go to the physical vDisk store location (e.g. D:\Win7Base) and copy the .vhd and .pvp vDisk files for the new vDisk. Do not copy the .lok file.
  5. 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
  6. In the Provisioning Service Console, right-click the vDisk and click Replication Status.
  7. 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.

  1. Right-click the Master Target Device and click Edit Settings.
  2. Select Hard disk 1 and click the x icon. Click OK.

  3. Edit the Settings of the virtual machine again.
  4. On the bottom, click New device and select New Hard Disk.
  5. Then click Add.
  6. 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.
  7. Expand the newly added disk and select Thin provision if desired. Click OK when done.
  8. Configure group policy to place the Event Logs on the cache disk.
  9. 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.

  1. Edit the settings of your Provisioning Services master virtual machine and remove the existing VHD.
  2. Make a choice regarding deletion of the file.
  3. Create a new Disk.
  4. 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.
  5. Configure group policy to place the Event Logs on the cache disk.

Verify Write Cache Location

  1. Boot the virtual machine and ensure everything is working.
  2. Open the Virtual Disk Status window by clicking the icon in the system tray. Make sure Mode is set to device RAM with overflow on local hard drive.
  3. If it says server then follow the next steps.
    1. Format the cache disk with NTFS. Only MBR is supported. GPT will not work.
    2. Make sure the pagefile is smaller than the cache disk. If not it will fail back to server caching.
  4. After fixing the problem and rebooting, the Cache Type should be device RAM with overflow on local hard drive.
  5. To view the files on the cache disk, go to Folder Options and deselect Hide protected operating system files.
  6. You’ll see the pagefile and the vdiskdiff.vhdx file, which is the overflow cache file.

Related Pages

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

48 thoughts on “PvS Master Device – Convert to vDisk”

  1. Hi Carl, for symantec AV do you recommend or seen any setup with redirecting the virus definitions to another drive other than C drive, since PVS is involved and streaming? I was thinking of creating another drive (other than the write cache disk) on the template as to redirect virus definitions there so that the machines aren’t redownloading them at reboot each time until an update to vdisk is done. What do you think?

  2. Hi Carl,

    We want to have two different Windows 7 Desktops

    One for our Systems Team – giving them the ability to install applications – That would be persistent – static VM which would require a PvD drive (We can only use B,K,O or U as P: is already in use, would that be ok)

    Our users to have 1-1 non-persistent – do we need a PvD drive is we don’t want them to install applications and for us to control it via Master Image?

    Do we create the PvD drive before we install VDA Agent and then the PVS Software?

    Can the VDA be 7.6 LTSR, while the pvs target software is 7.1

    Per machine looking to do WBC (10GB) and PvD (15GB) – is that enough?

    1. Apologies I mean can the VDA be 7.6 LTSR CU1 and the PVS Target be 7.6.2, our PVS Servers are still behind on

      Or do we have to keep them all on the same version, so VDA 7.6.5026. PVS 7.6.5019

      1. PvS servers must be upgraded before you upgrade the Target Device Software.

        The VDA software can be upgraded any time since there’s no official connection between PvS and XD other than the XD Setup Wizard in the PvS Console.

      1. Thanks Carl, always a big help

        How do you replicate, backup and restore them?

        I followed websters guide, createf the drives as stub holders. But not create the simple volume and left unallocated.

        Ran xendesktop wizard successfully for 3 provisioned machines, the storages for wbc and pvd are created.

        Where do I set the paging files? On the master image still in standard mode? Will i need to create the simple volume now on the master image or leave it unallocated as the article shows?

        1. You’ll have to figure out a way to backup and restore PvDs. This is one reason I’m not a fan of PvD.

          PvS will move the pagefile to the cache disk automatically. But make sure the pagefile is smaller than the cache disk.

          1. Thanks

            Do I have to do it in the master image or individually on each target device?

            My master image hasn’t allocated the D:, there is 10gb but not created as simple volume as websters guide?

            Any reason why he leaves both drives unallocated?

            Do I need to put it in standard mode> allocate volume and page file to D:?

          2. If pagefile is on C:, PvS will move it to D: automatically, assuming it can fit in D:. You’re welcome to boot a Maintenance Version (Private Mode) vDisk and manually configure the pagefile settings.

  3. Thanks Carl,This worked just fine and as described.

    How can I move a vdisk from one partition to another? We are running out of space and have created a new location to store vdisks.

  4. Hello Carl, here’s a fun question. Is it advisable to do an offline defrag when a vdisk is in maintenance and not private mode? Both allow writes, but citrix seems unclear on the distinction with regards to an offline defrag. Getting downtime to do private mode is very hard, so being able to merge a vdisk into maintenance and doing an offline defrag would be best. Any advice?

    Congrats on the great blog.

      1. I agree. But I mean putting the vdisk into a merged base state in maintenance mode and doing an offline defrag. Does that help shed any light on recommendations?

        1. Merged base is no longer a snapshot so that should be fine. I can’t remember if it lets you mount a merged base. Another option is to defrag it and import it as a new vDisk.

  5. Hi Carl,

    During the “seal” steps it is recommended to stop the DHCP Client service and import the regkey to clear the DHCP config.
    However, as soon as the DHCP service is stopped, the connection with the PVS server (and vDisk) is lost, and the server stops responding.
    If the regkey alone is imported without stopping DHCP, the values in the registry are not added.
    Any advise on this?

  6. Hey Carl, after you switch your first target device to boot from the vdisk (which now still has the hard disks attached), What are the recommended steps to do with the target device? Make it into a template? Clone it to an update machine? Thank you sir!

  7. Carl,

    What would be the recommended “Maximum RAM Size” for PVS Ram with overflow on hard disk? Using Server 2008 R2. Currently set at 2048MB but im noticing its filling up quite fast after reboots.

    1. Are you referring to the target devices (vDisk)? For RDSH, I normally set it to 4 GB or higher. More RAM = less IOPS. Citrix has found around 4 GB to reduce IOPS by 90%.

  8. Hey Carl, I read religiously your blogs, and they are very helpful..

    I’m trying to setup PvS 7.8 for the first time… Everything was going well until I tried to capture my master image (2008 R2, vSphere, EFI, hardware version 10, VMXNET3). My uEFI PXE is working properly, because the VM is redirected to “Citrix Provisioning Services UEFI streaming). I get an address by DHCP, but the VM stays “stuck” on “connecting to (the IP of my PVS server)…

    Any hints would be appreciated… 🙂


    1. I haven’t tried EFI yet. Not sure it’s useful on vSphere. Try posting your question to discussions.citrix.com. The PvS product manager reads the posts there.

    2. For an unknown reason, there was a problem with permissions in my SQL database. Rerunning the config wizard (on my PVS servers) solved it… Thx!

  9. Carl –
    Your guides have been a godsend. Thank you! A quick question – I see that you’ve mentioned both booting from Network and ISO options. What are your feelings about configuring with a boot partition? We’ve configured this in our environment in a test setting and it seems to work well, but I haven’t really seen any documentation mention it. As such I’m leery on using it in production until I see it blessed by someone who knows what they’re doing.

    1. Boot partition works fine but is difficult to change. Basically you’d have to delete and re-create the VMs. Not a big deal.

  10. Hi Carl –

    Great site and series of articles! We are just in the process of rolling out XenApp/Desktop 7.6.3 with provisioning services 7.7 (single server). I’m just labing the whole thing out but i’m stuck at Create/Delete/Reset Machine Accounts from AD.

    I get the following error when attempting to Create/Delete/Reset Machine Accounts

    Failed: Unable to perform the requested Search: Error Code: 0, message: ,provider : LDAP Provider. (21)

    Single DC running Windows 2008 R2 (2008 R2 FFL/DFL).

    The PVS service account has the following permissions:

    Database – sysadmin
    PVS Server – Local Admin
    Citrix Studio – Machine Creation
    AD – Domain Admin

    There doesn’t seem to be anything in the event log.

    The config should be pretty much identical to what you’ve documented.

    Any thoughts?


  11. Carl, I’m getting very strange behavior and perhaps you can help. I am working with NVIDIA GRID vGPU on vSphere 6 and PVS 7.6. When I installed the NVIDIA video drivers, I got a black screen on the vSphere Console so my workaround is to use RDP. I will figure out the vSphere Console issue later as that is not my huge concern right now. My problem is the Target Device was created fine. As long as the TD is set to boot from Hard Disk, I can ping and RDP into the virtual machine. When I change it to boot to vDisk, I can no longer ping and I can’t RDP. What is strange is it does seem to boot up fine. Its all green check marks in the PVS Console. I verified the IP address it is using through the vSphere Client and the PVS Console. What could be stopping the networking on the TD once I change it to vDisk?

    1. Single NIC?

      What OS version? If 2008 R2, did you install 2550978 (pci.sys)? Did you check for ghost NICs?

      Is the firewall enabled? Maybe DNS or AD is not working properly so Windows thinks it’s not on the domain network and thus enables the Public firewall.

  12. Thanks Carl,

    Some Xendesktop sessions freeze intermittently:

    Error: provisioning service virtual disk – connection lost

    Can last for a few seconds to a minute and then says “provisioning service virtual disk – connection restored”

    any ideas?

  13. Hi Carl;

    Thank you for all you do! Your posts are extremely valuable for small shop Citrix operators such as myself. 🙂

    I’ve spent some time Googleing and researching but am having a hard time finding information about block sizes. Maybe it means I don’t have to worry about it as much as I am… but when setting up my vDisk storage I had to pick block sizes on my SAN volume, on the NTFS volume, and for the VHD file itself.

    Am I fine with 4K default sizes on the SAN and NTFS volume and 2MB on the VHD file? Or could I tweak these and improve my performance? I’m caching on the target devices, not the PVS servers.



    1. On the PvS server side, I don’t think it matters. The PvS server should have enough RAM to cache the vDisk in memory and thus there should be very little disk activity. The only exception is Private Mode vDisks and I only recommend those for image updates.

      Client-side caching is a different story. You have RAM caching to help with that.

  14. Hi Carl,
    Hope you can help me here.
    I have been trying to create a Write Cache disk for the targets but only the Master device can see it.
    I have read somewhere prob from Carl Webster that on PVS 7.6 the disk on the Master Image should be left unformatted and that the targets do that on boot, but previously I formatted them but not on PVS 7.6.
    I have tried both methods and no joy 🙁
    I successfully created PVS disks before for another client but that was on Xenapp 6.5 also and an older version of PVS.
    I am going mad here trying to get this to work.
    The hyper visor is Xenserver, disk part says disk 0 for cache and disk 1 for streaming.

    Hope someone can help

    1. When you use the XenDesktop Setup Wizard, it automatically adds a cache disk and formats it. If you use the Streamed VM Setup Wizard then I don’t think it adds or formats the cache disk. I usually add an empty formatted cache disk to my template and that works.

  15. Hi Carl, I keep receiving a “Failed: Unable to save Active Directory change. Ensure the appropriate permissions exist to perform this task…” message when trying to join the device to domain. Do i need my AD rights delegated?

    1. I work mostly with mid-to-large sized enterprises and vSphere is the hypervisor that they use with some of them dabbling in Hyper-V. I think Carl Webster has PvS instructions that are more specific to XenServer.

  16. Hi Carl
    I am testing PVS 7.6 in my test lab on VMware workstation 11. I was able to create 2012R2 vDisk successfully but when trying to boot from the vDisk, the streaming does not happen. I was able to network boot the target and the target can find the PVS server and got the vDisk found message but is not proceeding afterwards. I tried

    Changing the network adapter from e1000 to vmxnet3
    Changed the hard disk and CD drive from SATA to IDE and removed IDE before vDisk creation
    I have enabled PVS server logging into Eventviewer and could not find any error in the PVS server.

    I am wondering how to proceed on this. Appreciate your assistance.

    1. I suspect that Workstation is not supported for PvS and I have no experience with it. You can try searching or posting at discussions.citrix.com

  17. Hi Carl, As usual Excellent Article.

    I am trying PVS in my single host Hyper-V lab. I have XA 7.6 Master VMs and targets are created manually on hyper-v (No SCVMM. What I am finding is that my targets have their write cache going to server (checked the WC partition is formatted with MBR) even though the vDisk is configured with ‘RAM with overflow to disk’

    1. Is it possible to create 2 or 3 targets manually from the master VM (without using SCVMM) that will use RAM cache with overflow to disk as WC location? if yes please let me know how this can be done?

    2. In my PVS server, I cannot power manage (start or shutdown) the devices. How would I configure PVS to power manage VMs in the hypervisor?

    1. 1. Make sure the pagefile is smaller than the cache disk. Also, make sure the cache disk is formatted with NTFS partition. The XenDesktop Setup Wizard can do this for you or make sure your template has formatted disk.

      2. I’m guessing Hyper-V doesn’t support Wake-on-LAN. But once the targets are booted you can send them a shutdown command from PvS console assuming the TD Agent is running.

  18. Great tutorial! The only problem I have is on “Verify Write Cache Location”, step 3a, my target device from which I created the golden image recognizes write cache disk as #1, not zero. Due to that, it keeps writing cache to PVS server. If I create new target devices, they are good to go. I guess I attached the write cache disk before capturing the image, and that screw up my target device.
    Is there an easy way to invert the disk numbering?

    1. What hypervisor? In vSphere, you can power off the VM, edit the settings, and you can change the SCSI from 0:1 to 0:0. When creating the PvS template, I always clone the original VM so the hardware is as identical as possible.

Leave a Reply