Configuring the vDisk access mode in PVS



  • Standard Image – Select this mode if a vDisk is shared by multiple target devices (write-cache options enabled).
  • Private Image – Select this mode if a vDisk is only used by a single target device (read/write access is enabled).


Standard Image mode

Standard Image mode allows multiple target devices to stream from a single vDisk image at the same time. This reduces the amount of vDisk management and reduces storage requirements.

When a vDisk is configured to use Standard Image mode, it is set to read-only mode. Each target device then builds a write cache to store any writes the operating system needs to make. There are several write-cache options available. Because the vDisk is read-only, each time a target device boots, it always boots from a ‘clean’ vDisk. If a machine becomes infected with a virus or spyware, the target device only needs to reboot the image.

When updates are made to a vDisk in Standard Image mode, changes against the base vDisk image are captured in a differencing disk file (.avhdx), resulting in a new version of the base image. Each new version remains directly associated with the base image. Versioning allows for the updates captured in the differencing disk to be staged (Maintenance, Test, Production) before those changes become available to Production devices. If issues are encountered with a version, that version can simply be reverted.

Although each target device uses the same vDisk, Provisioning Services personalizes the streamed image for each target device, providing the information needed to ensure the device is uniquely identifiable on the network. You can also specify additional personality settings for each device: you can store application-specific values in the database and retrieve the target device’s unique value as the device loads.

Private Image mode

A vDisk that is in Private Image mode closely models how a computer uses a regular hard drive. That is, only one target device can use a Private Image vDisk at a time.

The following illustrates Private Image vDisks (read/write) that are each assigned to a single production device, and a Standard Image vDisk (read-only) that is assigned to and shared by a collection of production devices. For Standard Image vDisks, write cache options include cache on server disk, on a device’s hard disk drive, or in the device’s RAM.


To configure the vDisk mode and any applicable write cache destination

Note: Only write cache destinations that are supported for Standard access mode appear enabled.
  1. On the Console, right-click on the vDisk for which you want to configure the vDisk access mode, then select vDisk Properties. The vDisk Properties dialog appears.
  2. Click on the General tab, then select the image mode (Standard or Private) that applies to this vDisk from the Access Mode drop-down list.
  3. If Standard image was selected, from the cache destination drop-down list, select the appropriate write cache destination.
  4. Click OK to exit the vDisk Properties dialog.


Provisioning Services or Machine Creation Services (2016 Edition)

When you want to migrate from Citrix 6.5 to Citrix 7.x, you need to make some decisions and one of the most important one is to choose whether to go for PVS or MCS. I have done some searches and found a lot of articles but some of them are really good and based on the real experiences. Have a look at this : (when you are making decisions)


And this;


From Barry Schiffer web site, he explains and puts things in a different perspective for anyone making this decision;

Let’s start with the first decision in the tree in which we ask the question about using a XenDesktop only, XenApp only or mixed platform. The reason for this is that, before XenDesktop 7, it wasn’t possible to do MCS for XenApp load. Since XenDesktop 7 it’s actually possible to use Machine Creation Services for XenApp.


In the old days we were worried about boot and logoff storms because of the amount of IOPS this generated on our expensive shared storage systems. If so we would advice to use Provisioning Services because of better IOPS caching possibilities.

Lots has changed in the past few years but the IOPS load is pretty much still the same, yet the decision making process changed. The reason for this change is that we now have more knowledge about the amount of IOPS and vendors jumped in and created new solutions offering huge amounts of IOPS on central or local storage.
On the hypervisor level we are now able to do live storage migrations. This helps us when we need to perform management tasks and don’t have the time to wait for all of the users to close their sessions.

Thin Provisioning

For Machine Creation Services it’s highly recommended to use a storage solution that offers the ability to utilize thin provisioning. This way we only use as much data as we need for write caching. If we don’t utilize thin provisioning each target will use as much disk space as the configured base image.


Another decision is the need for dedicated aka persistent virtual desktops. If we need persistency you were forced to use Machine Creation Services. The reason for this decision was based on the fact that Provisioning Services falls back to Server Side caching when the cache had to be persistent. This method of caching results in a crappy desktop performance.
Since the introduction of Citrix Provisioning Services 6 we are able to offer persistent caching on the local target hard disk, which pretty much solves this issue. We therefore are now able to utilize Provisioning Services and Machine Creation Services for persistent desktops.

Physical vs Virtual

When we have a demand for physical virtual desktops we still need Provisioning Services. Machine Creation Services integrates on the hypervisor storage layer and therefore can’t be used on a physical target. This is the simplest decision of them all!

Advanced Image Management

As a reader of my blog you should already know that I like automation therefore I would never update images but instead rollout a new image. This way I can retest my image deployment every once in a while . Not of lesser importance I can always go back to my deployment run books to see how a certain component was installed for troubleshooting purposes.

If you care about image versioning and do a lot of image updates Provisioning Services is your way to go. Provisioning Services gives you greater flexibility to work with image versions and updates. Not everyone agrees with me on this one so I have decided to keep this out of the decision tree for now.

Multiple image locations or multiple images

This section has been added after publishing the article because the decisions attracts some attention, mostly by the guys from Atlantis Computing which must mean this market space has their full attention:). When we look at the Provisioning Services (PVS) architecture we have a central image store, the PVS server, for the sake of keeping things simple I’m not going into where PVS gets the image from local, filer, DFS et cetera. Machine Creation Services (MCS) works on the storage layer and places the image on each datastore which is used for targets.
When I create a new image or update an image with PVS I just change the pointer for each target and I’m done. With MCS that’s different, MCS first creates a single imagefile from a VM snapshot and when finished copies that image to each datastore. This process takes up CPU, IO and network resources and can take up to an hour in one of my production platforms (SSD 10Gbit et cetera).
So imagine a VDI cluster with 12 hosts with locally presented storage, this could be SSD, FusionIO or just as easily Atlantis ILIO. This would mean we have, at least, 12 storage datastores. With PVS this all stays simple, PVS is the central image location. With MCS this would mean we copy the base image to 12 different datastores.
Aside from the multiple image locations think about what happens if you have more then one image. This is not uncommon in enterprises, an example could be a VDI image, an RDS image with Internet Explorer 10 and one with Internet Explorer 11. This would mean that for MCS we copy not one image to 12 datastores but three images to 12 datastores. Think about the time and resources going into maintaining those images.
My decision would therefore be to stick with Provisioning Services when you have more then a couple of datastores or images. 

Thanks Barry Schiffer, this is an awesome article.


Provisioning Services – Cache Options

How to access these options?

These cache options I have previously mentioned can be accessed via the properties of the vDisk. (To create one go to Store, right click and choose create a new vDisk)


Under access mode, if it is showing Private Image, cache type will be grayed out which is saying vDisk is currently in used and you can’t change this option. When you change the Access mode to Standard Image then you have options available;


Citrix Provisioning Services PVS

Citrix Provisioning Services (PVS) allows you to have a single instance image management of your XenApp and/or XenDesktop VMs. A single image means you only have to update a single image which is then streamed to hundreds of desktops.

In a production environment, PVS consists of at least two PVS servers for High Availability. A disk image is taken from a reference computer which has been built up with all patches, applications etc installed and configured, and the vDisk image is imported into PVS. The imported vDisk image usually sits on locally attached storage on each PVS server. ‘Target device’ VMs are created without a C: drive and set to boot from network. The MAC addresses of the VMs are added to the PVS database so that when the VMs PXE boot the PVS server knows which vDisk to provide. The first time a vDisk is streamed to a target device the vDisk is cached in memory on the PVS server.

Since we are streaming a single vDisk to multiple computers, the vDisk must be read-only to avoid corruption. But Windows can’t run off a read-only disk, so thanks to Citrix  PVS to have a ‘write cache’ . There is also default location for the write cache, however it is very slow and not ideal under high availability. Attaching a small (10GB) disk to each VM for the write cache is a good approach – this disk can reside on local host storage, the SAN. When the PVS target device reboots, the write cache is cleared so each boot is a ‘first boot’. To ensure there is no data loss, use redirected folders and a good profile management system. Since PVS 7.1, Citrix introduced a new write cache option called ‘Cache in device RAM with overflow on hard disk’. The option takes a chunk of VM memory and uses it as a disk cache which provides a massive performance boost over other write cache options.

Let me go through Write Cache options that Citrix PVS offers;

Write Cache in Provisioning Services Server

In PVS, the term “write cache” is used to describe all the cache modes. The write cache includes data written by the target device. If data is written to the PVS server vDisk in a caching mode, the data is not written back to the base vDisk. Instead, it is written to a write cache file in one of the following locations:

  • Cache on device hard disk
  • Cache in device RAM
  • Cache on device RAM with overflow on hard disk
  • Cache on server

When the target device is booted, write cache information is checked to determine the presence of the cache file. If the cache file is not present, the data is then read from the original vDisk file.
All current versions of PVS have the option for distributing write cache. It is called Multiple Write Cache Paths. The multiple write cache paths (for a store) option provides the capability of distributing the write cache files across multiple physical media. This feature helps to improve I/O throughput for heavily loaded servers.
When a target device starts the server chooses one of the write cache paths from the list based on the MAC address of the client. The goal of selecting a path based on the MAC address is to get an even distribution of the clients across the available paths. The algorithm selects the same path for a given client each time that client is booted.
This functionality is needed to ensure that during a High Availability (HA) failover the new server would choose the same write cache for the client (otherwise it would not be able to find the write cache file and the client would hang). If the defined write cache path is not available to a server, the server falls back to the standard vDisk path.
It is not recommended for the Cache on the server to be used in production environments.

Cache on device Hard Disk


  • Local HD in every device using the vDisk.
  • The local HD must contain Basic Volume pre-formatted with a Windows NTFS file system with at list 512MB of free space.

The cache on local HD is stored in a file on a secondary local hard drive of the device. It gets created as an invisible file in the root folder of the secondary local HD. The cache file size grows, as needed, but never gets larger than the original vDisk, and frequently not larger than the free space on the original vDisk. It is slower than RAM cache, but faster than Server cache and works in a HA environment.

Cache in device RAM


  • Appropriate amount of physical memory on the machine.

The cache is stored in client RAM (memory). The maximum size of the cache is fixed by a setting in vDisk properties. All written data can be read from local RAM instead of going back to the server. RAM cache is faster than cache on server and works in a HA environment.
Note: If more different sectors are written than the size of the cache, the device stops.

Cache on device RAM with overflow on Hard Disk


  • Provisioning Service 7.1 or later.
  • Windows 7, Windows Server 2008 R2 or later.
  • Local HD in every device using the vDisk.

When RAM is zero, the target device write cache is only written to the local disk. When RAM is not zero, the target device write cache is written to RAM first. When RAM is full, the least recently used block of data is written to the local Write Cache disk to accommodate newer data on RAM. The amount of RAM specified is the non-paged kernel memory that the target device consumes.

Cache on Server


  • Enough space allocated to where the server cache will be stored.
Server cache is stored in a file on the server, or on a share, SAN, or other location. The file size grows, as needed, but never gets larger than the original vDisk, and frequently not larger than the free space on the original vDisk. It is slower than RAM cache because all reads/writes have to go to the server and be read from a file. The cache gets deleted when the device reboots, that is, on every boot the device reverts to the base image. Changes remain only during a single boot session. Server cache works in a HA environment if all server cache locations to resolve to the same physical storage location. This case type is not recommended for a production environment.

SQL Connection Error – (provider: Named Pipes Provider, error: 40)

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server.


This is trying to tell you that some of the services are not running and it is not communicating with the database.

Basically go to SQL Server Configuration Manager either searching or going to All apps…

Under “SQL Server services“, check your services if they are started and running…


If necessary just start the services and try logging in..