Contents

Recommended Install Order for Preparing Target Device Captured by Provisioning Server to Deploy vDisk

Website Visitors:

PVS vDisk Capture process

Complete the following tasks on the master target device you are preparing to capture the image of an operating system:

  1. Create new VM and remove system reserved partition (Goto Remove System Partition while installing OS option given below)
  2. Install Hypervisor tools such as Hyper-V, XenServer, or VMware and restart the target device (lets call it base vm). Note: if you want to use “Cache on Hard disk” goto Cache on Hard disk steps first (given below).
  3. Install PVS target device software and capture disk to PVS.
  4. Now we have a PVS vDisk ready and captured. Copy this disk in the same PVS store, rename it and add it to PVS console.
  5. Make sure disk is in private mode, and start the machine.
  6. Install VDA software, windows updates, any other applications. Note: By this way, if there is an issue with the new copy while installing applications or if it is crashed while installing windows udpates, we just have to copy the PVS vDisk again. Thats it. No need to capture the disk etc etc again.
  7. Power off and set it to standard mode. Set new devices to boot from vdisk, boot with multiple devices and check.

If you use xendesktop setup wizard, it will automatically create write cache disk for you in your target device VM. You just have to specify size of write cache disk.  You don’t even have to create a write cache disk in target device VM. Also note that when VMs created with xendesktop streaming wizard are booted for first time, they will create cache on the server. From second logon they will create cache on the hard disk. When booted for first time they will default to cache on server and then format the write cache disk, which is attached locally to the VM. So, from second logon, cache is stored on VM local disk.

Cache on Hard Disk steps

Below steps are only useful when you want to use cache on hard disk type. If you want to use cache on ram, or ram overflow to server, you don’t have to perform below steps. I will describe three methods on how to do this. You can choose whichever method you like.

Method 1:

  • Create new VM and remove system reserved partition (Goto Remove System Partition while installing OS option given below)
  • Install OS and once logged in, Add additional 10 GB drive to the machine. (or your desired size drive. This will be used for cache to be stored to hard disk).
  • Format the drive as NTFS. Make sure you can see and open the drive in explorer.
  • Continue from second point till sixth point in above pvs vdisk capture process.
  • Change disk type to standard mode.
  • Goto your base vm or target vm in your hypervisor and remove the hard disk from the VM. Note that you will have two drives. Remove OS drive for this VM. Your vm should have 10 GB drive, which will be used for cache. This is because, your vm already had 10 gb drive, it is formatted and PVS knows where this drive is, in the VM. Moreover, PVS marks OS drive as 0:0 and this 10 GB drive as 0:1. So, after it booting with vdisk, it marks vdisk as 0:0 and 10 GB drive as 0:1 and stores cache on this 10 GB drive.
  • Convert this base VM to template in your hypervisor. Using streamed VM setup wizard or xendesktop setup wizard create VMs. AD accounts are automatically created when you use steaming wizard and xendesktop setup wizard.

Method 2:

  • Create VM and remove system partition. Perform steps from 2 to 6 given in pvs vDisk capture process given above in the beginning of this page.
  • Now you will have vDisk with OS and hypervisor tools. (Note: here 10 GB or 20 GB disk is not attached to the target device yet).
  • Set vDisk in standard image mode with cache on hard disk or cache on ram with overflow to hard disk.
  • Create a target device and add 10 or 20 GB drive to it. Boot from network.
  • Open diskmgmt.msc in this VM, Initialize disk as MBR and create a simple volume and format it as NTFS. Make sure drive letter is assigned and you can access it.
  • Shutdown the machine, clone it and convert the cloned VM into template. Some hypervisors doesn’t allow you to convert a template back to VM. So, clone it so that your original target device is safe.
  • Create AD account login and check write cache.
  • Using xendesktop setup wizard or streaming wizard choose the template you created in above step and create as many VMs as you want.

Method 3:

  • Capture vDisk (as given in above capture process) without adding any cache drive ie., with only one OS drive by installing all apps, vda software, hypervisor tools etc.
  • Once vdisk is captured in PVS, goto the base image VM in your hypervisor, and add a hard disk with 10 GB (or any desired size). Boot it (you are using OS from base vm’s hard disk here) and format that new hard disk as NTFS. Make sure you can open that drive with no errors.
  • Shutdown that VM, remove OS drive and convert it to template. This template will have a 10 GB drive already and formatted.

In Simple terms:

Method 1 - On Fresh OS, add 10 GB drive and capture it to vDisk.

Method 2 - Once OS is captured to vDisk in PVS, create a target device, add 10 GB drive for write cache to that target device vm in hypervisor, and convert it to template.

Method 3 -  Once OS is captured to vDisk in PVS, login to the same base VM (using OS from base VM hard disk), add 10 GB drive and format it. Remove OS drive and convert it to template along with the 10 GB drive.

I prefer Method 3.

With method 1, after you restart from network, you might receive errors like “cannot find OS drive. Remove any extra drives and try again”. Because 10 GB drive is attached.

Remove System Partition while installing OS

While installing OS, at the page where it creates partition, you would see a system reserved partition. Hit Shift + F10 to bring up command prompt. In the command prompt type diskpart and follow the below commands:

https://www.mediafire.com/convkey/dd85/wk3fpoxa7de20sb5g.jpg

There are different ways to install and capture master vDisk in PVS.

Type 1:

  1. Hypervisor (ex vmware) tools
  2. VDA software
  3. Target Device software
  4. Capture disk in PVS
  5. Windows Updates to version allowed by PVS/Brokers
  6. All other apps.

Type 2:

  1. Create VM(remove system reserved partition), join to dmain and Install Hypervisor tools.
  2. Install applications and windows updates.
  3. Install and run PVS imaging wizard. (Change to Boot from network).
  4. Remove Hard disk (If you want cache on hard disk, you should already have 10 or 20 gb drive attached and formatted with NTFS. It should have min 512 mb free space).
  5. Set vDisk to private mode.
  6. Install VDA software and run scripts to optimize it (if any).
  7. Reboot and change vDisk to standard mode.

I tried with below steps. If we have only vmware tools and capture the OS to PVS vDisk, we can then install VDA software and add it to any other citrix xendesktop site. OS will be clean as the vDisk file doesn’t have any VDA software with previous delivery controller names.

  1. vmware tools
  2. Target Device
  3. Capture disk in PVS - capture vdisk with only vmware tools and target device software.

Copy this vDisk, rename it and install:

  1. VDA
  2. Windows Updates to version allowed by PVS/Brokers
  3. All other apps.

With my process, there is no way that the OS disk has other delivery controller names. You install VDA software, point to a site (site1). Copy the vDisk, install VDA software, and point to another citrix site (site2).

Notes:

  • While using xendesktop streaming wizard, if you use BDM partition, you don’t have to use PXE or boot iso.
  • Other way is to specify PVS server name via boot ISO, or PXE.
  • After you configure “Device on Hard Disk” and boot your target device in standard mode, goto your PVS server, store location. You will find a writecache folder. Open it and check if any cache files are created. If you see any files there, it means cache on hard disk failed. By default cache would be redirected to server if “cache on hard disk” fails.
  • Enable PVS-Accelerator option is only available when you have xenserver as your hypervisor. This would cache OS on xenserver host for first time and all subsequent VMs on that host would get OS very fastly as OS is already cached and accessed from the xenserver host.

UPDATE:

With 1906 PVS setup, you have option for local write cache when you use citrix virtual desktops setup wizard. You can specify how much space you need for write cache. You dont need above mentioned steps. This wizard will create a catalog if it doesnt exist in your site and adds number of VDIs you specify.

If you use streamed vm setup wizard, it just creates VDIs in your hypervisor. You should follow above steps if you intend to use cache drive.

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: