For an up-to-date analysis of the vDisk Replicator Tool, please refer to this blog post from Rob Zylowski. 

During my time as a field consultant, I’ve noticed that one of the most common operational challenges Citrix administrators face on a regular basis is replicating vDisks across PVS servers and farms. This has commonly involved time-consuming manual work by administrators, a process that could be simplified with an automated replication script. Something like we’re introducing: the vDisk Replicator Tool.

Whether ensuring high availability within a farm or migrating vDisks from Test/Development environments (or even between datacenters), the most common solutions to this problem that I have seen involves manual intervention from administrators. Even if administrators have configured automatic replication of store contents across servers or shares, they must still manually export and import (or add) vDisks and versions when leveraging multiple farms. While not necessarily time-intensive, this process is unnecessarily complex for a software tool that is designed to reduce management overhead.

When we released the PVS PowerShell SDK with PVS 7.7, the thought occurred to me that Citrix administrators might find an automated replication script to be a useful tool in their arsenal. After several iterations and considerable testing, I’m proud to present to you the vDisk Replicator Tool.

Designed from scratch in order to copy vDisks between PVS farms, the vDisk Replicator Tool leverages Robocopy and the PVS PowerShell SDK to allow administrators to easily and reliably ensure consistency across their PVS environment. Using the tool, administrators can easily replicate a vDisk (or vDisks) from one PVS server to all other servers in the same site, and all PVS servers in another farm and site (including the export and import of vDisks and versions). While originally designed as a command-line utility, the tool now includes a graphical user interface, so administrators have multiple ways to reap the benefits of seamless vDisk replication.

So, what does the vDisk Replicator actually do?

The vDisk Replicator Tool is designed to replicate vDisks and versions from local storage on a PVS server to local storage on other PVS servers in another Site.  The “source” and “destination” Sites may reside in the same Farm, but they must not share a Store. The vDisk Replicator Tool is not designed to replicate vDisks within a Site, and does not support vDisk stores that reside on shared storage.

The following images depicts supported scenarios for the vDisk Replicator Tool:

Inter-Farm Replication

inter-farm

Intra-Farm (Inter-Site) Replication

intra-farm-inter-site

The following images show unsupported scenarios for the vDisk Replicator Tool:

Shared Storage

shared-storage

Intra-Farm (Intra-Site) Replication

intra-farm-intra-site

Here are instructions for using the vDisk Replicator Tool:

Pre-requisites

Administrators must have local administrator rights on each PVS server, as well as PVS administrator rights on both the “source” and “destination” Farms. After downloading the tool, administrators must prepare several pre-requisites before beginning to replicate vDisks:

  • First, the PVS Console must be installed on the “source” and “destination” PVS servers – this ensures that the PowerShell SDK will be available.
  • Second, administrators must enable Credential Security Service Provider (CredSSP) authentication with PowerShell. CredSSP allows the script to invoke commands on remote PVS servers during replication without prompting administrators to enter their credentials more than once.
    • On the “source” PVS server and each “destination” PVS server, launch a PowerShell terminal as Administrator and execute the following command: Enable-WSManCredSSP -Role Server
    • On the “source” PVS server, in the same PowerShell terminal, execute the following command: Enable-WSManCredSSP -Role Client -DelegateComputer “*.FULL.DOMAIN.NAME” –Force where FULL.DOMAIN.NAME is the full name of the domain in which the environment resides.

How to Replicate

As I mentioned earlier, the tool can be used two ways: (1) called from the command-line with all parameters specified at run-time, or (2) via the GUI. From here on out, I’ll describe how to use the GUI, as instructions for command-line can be generated from the GUI.

  • To begin, simply launch a PowerShell terminal as Administrator and execute the following command: .\<Path to Tool>\vDiskReplicator.ps1 –GUI
  • When the first window opens, type the FQDNs for your desired “source” and “destination” servers, then click Next. As the names suggest, the “source” server is the PVS server that contains the vDisk(s) and/or version(s) you would like to replicate, while the “destination” server is a PVS server in the farm you would like to replicate them to.
  • When the second window opens, use the drop-down boxes to select your desired “source” and “destination” sites and stores, then click Select. Again, as the names suggest, your “source” site specifies the servers that you would like to replicate the vDisk(s) and/or version(s) to in the “source” farm (selected in the previous window), while the “source” store specifies the path to the vDisks.  Similarly, the “destination” site specifies the servers that you would like to replicate the vDisk(s) and/or version(s) to in the “destination” farm (selected in the previous window), and the “destination” store specifies the path for replication.
  • When the third (and final) window opens, use the checkboxes to select which vDisks you would like to export and replicate, then click Start. Alternatively, clicking Output CLI, will generate a PowerShell script (saved to the current directory) to run the vDisk Replication tool with the parameters selected in the GUI. As of this version of the tool, all versions of the selected vDisks will be exported and replicated.

After beginning the replication process, the tool runs silently.  Please wait for the script to complete before attempting to validate successful replication.

What’s Next?

It’s up to you!  I’ve included a few features that didn’t quite make it into the first version of the tool in this poll. Please select any features you would like to see, and feel free to suggest your own, as well! 

Disclaimer
This software / sample code is provided to you “AS IS” with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software / sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software / sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software / sample code. In no event should the software / code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE / SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the software / code belongs to Citrix, any distribution of the code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

syn17-d-banner-blogfooter-729x90