OS Virtualization in Practice (Part 2)

by [Published on 21 April 2009 / Last Updated on 21 April 2009]

How to add a client to the Provisioning Server database & creating an image of the system on vDisk.

If you would like to read the first part of this article series please go to OS Virtualization in Practice (Part 1).

Introduction

In the previous article we started using operating system virtualization by installing the Citrix Provisioning Server, configuring the basic settings for the Provisioning Server and building the master client to create the image on the created virtual disk. In the previous article we concluded with the installation of the device client of the Provisioning Server. We will continue now by adding this client into the provisioning server database and creating an image of the system on vDisk.

Creating the image

As described in the previous article we need to add the client to the Provisioning Server infrastructure. This is done at the device collection level by choosing Create Device. The devices are recognized by their MAC address, which means you will need to find out the address of the client first. You will need to specify the name of the client before you start (for the master image this is just for administrative purposes). When the device is created, some configuration settings need to be performed via the properties option. In the least, the boot from the options menu needs to be set:

  • General - Boot From: Need to be set to; Hard Disk, so the server will boot from it.
  • vDisks – vDisks for device: The vDisk should be selected on the image it should be written on. Remember that this vDisk needs to be configured in private mode, so changes can be written to the virtual disk.


Figure 1: Adding the client to the Provisioning Server infrastructure

When the system is added the system can be restarted. The system needs to be started using PXE to setup a connection with the provisioning server infrastructure. When the system has connected to the Provisioning Server the system will start the operating system from the hard disk.

When the system is loaded the virtual disk is connected to the system. To create the image the disk needs to be added as a hard disk by assigning a driver letter to the disk and formatting the disk using Disk Management (can also be arranged on the Provisioning Server). When the disk is available as a normal Windows drive the Provision Server Image Builder utility can be started. Within this utility it is advisable to use the optimize button to disable unnecessary services and programs. After that browse to correct destination drive and push the Build button. The operating system will be imaged to the virtual disk. Remember that the technique is similar to other image methodologies, so arrange that there are no unique characteristics in the operating system or applications (see for example my article about running Citrix Presentation Server/XenApp with Citrix Provisioning Server).



Figure 2: Device Image Builder in action

When the image is created the system needs to be closed down. The virtual disk is then available again in the console for changing properties. I assume that most people will use Provisioning Server for the option to use one virtual disk for more clients. Therefore we change the access mode of the vDisk to Standard Image and choose one of the cache types (I prefer caching on the device on HD or RAM). After this change it is possible to roll out new clients using operating system streaming.


Figure 3: Changing the vDisk to a standard image

Adding a new client

We have configured a virtual disk with an operating system image, so now we can add a client to use this virtual disk to start operating system streaming. Again we need to add this client into the console by using the MAC address of the client. To this client the vDisk needs to be assigned and the boot from option needs to be configured with the option vDisk. This arranges that the connected vDisk will be used to boot up (in other words operating system streaming). Normally, a client will be part of a domain. At this moment the power of Provisioning Server will be shown. By right clicking the client and choosing the option Active Directory – Create Machine Account. You can choose within the wizard the Organization Unit in which the computer account needs to be created.


Figure 4: Create an Active Directory account for the Citrix Provisioning Server client

When the account is created there is one thing that should be arranged. Just like user accounts also a computer account has a kind of password, which is changed on a regularly basis. Because this is synchronized between Active Directory and the Operating System on the client this will cause using Citrix Provisioning Server that this password is out of sync and the client cannot connect to the domain anymore. Therefore on the Organizational Unit the clients are located, a group policy object setting needs to be defined. In the Computer Configuration – Security Settings- Local Policies – Security Options the setting Domain Member: Disable machine account password changes needs to be enabled. Enabling this setting can be seen as a security risk and therefore Citrix Provisioning Server can arrange that this password will be changed periodically by enabling this option within the console.


Figure 5: Disable the machine account password changes

If the policy is defined, the client is added to Active Directory (in the correct Organizational Unit) and the vDisk is assigned, everything is available to start the new client using the PXE servers and starts the operating system via streaming with Provisioning Server. When the logon window is displayed, you will see that Citrix Provisioning Server has arranged that the computer name is changed to the name specified in the console and that it is possible to logon to the domain. Further you won’t notice many changes except the Client icon in the system tray.


Figure 6: Logon screen of the virtualized operating system

Updating a vDisk

Till now we have created our first virtualized operating system and a client is running using that operating system. But after a while updates need to be applied to the virtualized operating system. Think of Windows Updates and hotfixes, applications updates and/or new applications. There are several methodologies, which I will explain briefly in this paragraph.

  • Creating a complete new vDisk
    This first option is the most labor-intensive one, but also the most simple. The starting point is just to use the same procedure as already described by creating a new vDisk, followed by installing a new system for creating the image. You could also use the earlier installed master image builder, but remember that Citrix advices to install the Provisioning Server Client as the last software component. After the image is created on the vDisk the vDisk can be assigned to the client and when rebooted they will use the new vDisk. In previous manuals this methodology was described, but Citrix now recommends to use one of the below methodologies.
  • Updating (a copy) of the current vDisk
    I personally recommend this version, because it is quick and much easier than the incremental methodology. The first step is creating a copy of the current vDisk using Windows copy commands (remember that the file should not be in use to accomplish this part. I also create a copy of the vDisk before I put it into production, so I don’t have to disturb production activities). After importing the vDisk into the console, the mode should be changed to private mode. Boot one server with this disk in private mode and install the updates. Shutdown the server and change the mode to standard mode again, so the disk can be used for offering the updated operating system. Citrix Provisioning Server has an automatic update feature, so such a new vDisk will be automatically assigned to the client (when the client reboots).
  • Incremental vDisk Updates
    Using this methodology you will also create a copy of the current vDisk, import the copied vDisk into the console and configure it into private mode. Boot a client with this private mode vDisk and install the updates. After shutting down this client, the disk should be configured in standard mode again. Then using the auto update utility will create a delta-file which can be applied again using the automatic update features.

Conclusion

In this second article I continued showing using operating system streaming in practice. We started the article with creating an image, followed by adding a new client. The last topic was about applying updates to the virtualized operating system. Of course it is not possible to mention all options and functionalities of a product, but I think this article series gives a good overview of such a product and have made your enthusiastic about the technology and would like to discover the product more yourselves.    

If you would like to read the first part of this article series please go to OS Virtualization in Practice (Part 1).

The Author — Wilco van Bragt

Wilco van Bragt avatar

After working for a couple of consulting firms as a senior technical consultant and technical project leader Wilco started his own freelance company VanBragt.Net Consultancy in April 2008. Wilco is certified n Citrix (CCIA, CCEE/CCEA, CCA), Microsoft (MCITP, MCTS, MSCE, MSCA) and Prince2 (Foundation). Wilco is also a RSVP (RES Software Valued Professional), Citrix CTP (Citrix Technology Professional) and a Microsoft MVP (Most Valuable Professional) on RDS.

Latest Contributions

Featured Links