With PVS 6.x you may use DFS for replicating the image store across multiple PVS servers. Here is a small script which installs and configures a replicated PVS store between 2 PVS servers.
The script has 4 variables:
- PVSROOT=D: (the root drive where the replicated PVS Store will be created)
- PVSSERVER1=PVS01 (the name of the first PVS server)
- PVSSERVER2=PVS02 (the name of the second PVS server)
- STORENAME=PVSSTORE (the name of the replicated PVS store)
Run the script first on PVS2, then on PVS1!
DFS will be installed, a Folder named D:PVSSTORE created and added to PVS database. DFS replication will be configured between the two servers.
The script:
@echo off echo ******************************************** echo * PVS 6.1 DFS config script version 1 * echo * By Magnar Johnsen Firstpoint AS * echo * www.firstpoint.no www.virtexperience.com * echo ******************************************** SET PVSROOT=D: SET PVSSERVER1=PVS01 SET PVSSERVER2=PVS02 SET STORENAME=PVSSTORE set /p choice=Type option: PUSHD “%~dp0” ServerManagerCmd.exe -install FS-DFS-Replication MD %PVSROOT%%STORENAME% echo y|cacls %PVSROOT%%STORENAME% /M /G “network service”:F if %COMPUTERNAME%==%PVSSERVER1% ( “C:Program FilesCitrixProvisioning Services ConsoleMCLI.exe” add store -r path=%PVSROOT%%STORENAME% storename=%STORENAME% dfsradmin RG New /rgname:”PVSREPLICATION” /rgdesc:”Citrix Provisioning Image Replication” dfsrAdmin RG Set Schedule full /RGName:”PVSREPLICATION” dfsradmin member new /rgname:”PVSREPLICATION” /memname:%COMPUTERNAME% dfsradmin member new /rgname:”PVSREPLICATION” /memname:%PVSSERVER2% dfsradmin conn new /rgname:”PVSREPLICATION” /SendMem:%COMPUTERNAME% /RecvMem:%PVSSERVER2% /ConnEnabled:true /ConnKeywords:”From %COMPUTERNAME% to %PVSSERVER2%” dfsradmin conn new /rgname:”PVSREPLICATION” /SendMem:%PVSSERVER2% /RecvMem:%COMPUTERNAME% /ConnEnabled:true /ConnKeywords:”From %PVSSERVER2% to %COMPUTERNAME%” dfsradmin RF New /rgName:”PVSREPLICATION” /RfName:%STORENAME% /RfFileFilter:”~*,*.lok” /RfDirFilter:”WriteCache” dfsradmin Membership Set /RgName:”PVSREPLICATION” /RfName:%STORENAME% /MemName:%COMPUTERNAME% /LocalPath:%PVSROOT%%STORENAME% /MembershipEnabled:true /StagingPath:%PVSROOT%STAGING /StagingSize:100000 /CDSize:100000 /IsPrimary:true dfsradmin Membership Set /RgName:”PVSREPLICATION” /RfName:%STORENAME% /MemName:%PVSSERVER2% /LocalPath:%PVSROOT%%STORENAME% /MembershipEnabled:true /StagingPath:%PVSROOT%STAGING /StagingSize:100000 /CDSize:100000 /IsPrimary:false ) |