Quantcast
Channel: Carl Stalhood
Viewing all articles
Browse latest Browse all 594

PvS Master Device – Convert to vDisk

$
0
0

Last Modified: May 19, 2015 @ 3:32 pm

Navigation

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 Select New or Existing vDisk page, click Next.
  7. In the New vDisk page, enter a name for the vDisk.
  8. Change the vDisk type to Dynamic and click Next.
  9. In the Microsoft Volume Licensing page, select None and click Next. We’ll configure this later when switching to Standard Image mode.
  10. In the Capture Image Volumes page, you can grow the vDisk but you can’t shrink it. In most cases, leave it set to the defaults and click Next.
  11. In the Add Target Device page, enter a new computer name, and select a Collection. If Hyper-V, make sure the MAC address is for the Legacy NIC and not the synthetic NIC. Click Next.
  12. In the Summary of Farm Changes page, click Optimize for Provisioning Services.
  13. Click OK.
  14. Then click Finish.
  15. 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.
  16. 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.
  17. Right-click the new vDisk and click Load Balancing.

  18. For some reason the imaging wizard defaults to load balancing. That won’t work if the vDisk is in Private Image mode. Change it to Use this server to provide the vDisk and select the server that actually has the .vhd files. Click OK.
  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 Finish. 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.

KMS

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


Viewing all articles
Browse latest Browse all 594

Trending Articles