Thursday, April 1, 2010

Installing Citrix Provisioning Server 5.1 sp2 [part 2]

Continuing from Installing Citrix Provisioning Server 5.1 sp2 [part 1] this article covers capturing an image into provisioning server.

Assumptions for this to work

  • You've followed part 1 of this guide (and all of it's assumptions for this to work)

  • A Citrix XenApp Server you wish to image

  • Install OS, Patch, install any applications, test that it's working exactly the way you expect it to. If this is your first PVS host I suggest you start with a clean XenApp Install with maybe just MS Office or other simple apps before tackling complex home developed applications - server can be Virtual or Physical, but in a perfect scenario this server will become your "Master" server for this image and should not be used for anything but updating the PVS disk

PVS Server Preparation Work

  1. On your Provisioning Server open the Provisioning Services Console

  2. Select Sites > [Your Site Name] > vDisk Pool

  3. Select Action > Create vDisk

  4. Set the Filename:
    XenApp [ver] - [Server Role] (Rev#)
    ex: XenApp 5 - Office 2007 (Rev1)
    Set the description:
    Short explanation on the image vDISK
    ex: Microsoft Office 2007 Silo
    Set the size in MB large enough to encompass the existing disk (add +15% of current usage for XenConvert tool)
    Set the VHD format to Dynamic
    Click Create vDisk

  5. Select the new vDisk, select Action > Properties

  6. In the Properties window click Edit file properties
    On the General Tab enter the class similar to the filename (minus rev#):
    XenApp [version] - [server role]
    ex: XenApp 5 - Office 2007
    (this is important for part 3 of this guide which will cover Advanced Maintaining of PVS hosts)
    Click OK twice

  7. Under Device Collections select Action > Create Device Collection

  8. Name it the same as above:
    XenApp [version] - [server role]
    ex: XenApp 5 - Office 2007
  9. With this new Collection selected click Action > Create Device

  10. Name: [server name]
    Description: [short explanation of the device]
    MAC: This is your Server's NIC MAC (found on the server using ipconfig /all)
    Leave Apply the collection template to this device unchecked
    Click OK

  11. Select the newly created device, click Action > Properties

  12. On the General Tab:
    Class: this should match the Class set above on the vDisk
    Boot from: Hard Disk

    Click the vDisks tab
    under the vDisks for this Device section, click Add

    Add the new vDisk created above, click OK
    Make sure the new vDisk appears in the list like shown below
    Click OK

Preparation of the Master Server

  1. Set the Server to Network Boot

  2. Reboot the server and set the server's Boot order in BIOS to Network first - check your Server Guide for more info.
    XenServer Guests can be set to network boot under Properties > Startup Options (as shown)

    Make sure the Server boots, gets a DHCP address from your DHCP server and connects to your provisioning server as expected then boots to the hard disk as normal

  3. Set DisableTaskOffload Registry setting **XenServer PVS hosts only**

  4. If you plan on using this image on a XenServer at some point in the future you should set the following registry key to assure there are not excessive retries on PVS disk during streaming

  5. Pre-install XenServer Tools **XenServer/VMware PVS hosts only**

  6. Sadly there is no easy way to do this if the host is not already in your XenServer pool (if it is, just install the tools if not already installed) if the server is currently physical but will be streamed to a XenServer as a PVS Guest then you need to get the XenServer tools from a XenServer - the quickest way to do this is to use WINSCP or a similar tool, connect to a XenServer and under /opt/xensource/packages/iso should be xs-tools-5.5.0.iso (this is for 5.5 of course) - download this and virtually mount or burn and load on the server and install (accept defaults).

    Same process for VMware tools should be followed, as I'm not really a VMware Expert I can't help here, but Google "how to install VMware Tools" should get you started.

    With that said, I've never done VMware and XenTools on a server, don't know if you can have both, so be warned if you plan on streaming to XenServer and VMware you may want to capture two different PVS vDISKs one with XenTools the other with VMware Tools.
  7. Install XenConvert 2.1

  8. XenConvert is a free download from Citrix and can be found here. Note there is two versions x32 and x64 - make sure you install the version that matches your server architecture.

    2.1 is improved over 2.0.3 that comes on the PVS 5.1 sp2 disk, by installing it first you won't have to uninstall 2.0.3 to put 2.1 on after.

    Accept all the defaults

  9. Install Citrix PVS Tools on the server

  10. Take the 5.1 SP2 Provisioning Server CD, load it on the server and when autorun comes up select Target Device Install > Target Device Installation

    You will be prompted to install XenConvert 2.0.3, click Install (as we already installed a newer version above, the install will be quick)

    Accept all the defaults

    Reboot if prompted to at the end of install.

    There will be a new icon for PVS down in the taskbar which should show an "active disk" - if not reboot and make sure you see the server talk to the Provisioning server prior to OS boot.
  11. Install the XenApp Prep Tool

  12. XenApp Prep Tool will configure the Server for PVS imaging - it is another free download that can be found here.

    Accept all the defaults
  13. Enable Automount

  14. For XenConvert to mount disks correctly Automount must be enabled on the server.
    Open a command prompt

    Automount enable [ENTER]

Capturing the Image

  1. Run XenAppPrep

  2. Open a command prompt
    CD C:\Program Files\Citrix\XenAppPrep [ENTER]
    XenAppPrep /PVS [ENTER]


  3. Launch XenConvert

  4. From: This Machine (servername)

    To: Provisioning Services vDisk
    Click Next >

  5. Setup Conversion Disks

  6. Confirm the correct drives are selected
    You may have to click the Autofit button to adjust partitions accordingly
    Click Next >

  7. Final Conversion Screen

  8. Click Convert

    Click Yes on the "overwrite" message box

    At the end you should see a success message.
    Click Finish

    (you can also view the conversion log if you so desire)

  9. Restore XenAppPrep Settings

  10. Open a command prompt
    CD C:\Program Files\Citrix\XenAppPrep [ENTER]
    XenAppPrep /RESET [ENTER]

    Power off this server (not reboot - make sure you can remotely power on or issue a reboot and quickly move to next step before it loads to network again). This will clear the vDisk lock on the PVS server so you can change it.

  11. Set the vDisk to Standard Mode

  12. Back on your Provisioning Server we will set the newly populated image into a state for deploying to hosts.

    Select the correct vDISK from the list (CitrixProv > Sites > [Your Site Name] > vDisk Pool)
    Select Action > Properties

    Click Edit file properties
    On the Mode Tab
    Access Mode should be changed to Standard Image

    Check Enable automatic updates for this vDisk
    Apply vDISK updates as soon as they are detected by the server
    (Again this is important for part #3 of this guide)

    Click Options Tab
    Check Active Directory machine account password management
    Click OK

    You can now power back on the Master Server.

Part 3 covers Streaming your captured image and maintaining the image using versions and classes.

No comments:

Post a Comment