Posted by: thomast74 | 2011-01-05

VMware View 4.5 Linked Clones

The new version of VMware View is out and I will use this to test and play around to see if what is new, different and hopefully better. This is very exciting. The following list layouts the plan I have in mind (but subject to change) to cover VMware View 4.5:

This part will talk about the linked clones. Where is the difference to deploying virtual machines from templates? Where is the difference in the creation of a Desktop Pool? How do I update or refresh the base image and the already deployed virtual desktops?

A lot questions…


What are Linked Clones?

Linked clones are not like clones from templates or existing virtual machines. These will create fully independent new virtual machines. Linked Clones are dependent on a parent virtual machine from where they are clones from. In vCenter they look like independent but the master Hard Disk is actually linked to the parent virtual machines hard disk.

So what happen when you make changes inside of the Linked Clone? After the Linked Clone is created a snapshot is created too. This means that all changes are written to this snapshot disk and the original stays untouched and unchanged. Very clever and provides you with the possibility to refresh the Linked Clone and revert everything back to its original state without do the re-cloning and customization.

But you need be careful. When a user makes changes, happen when you have dedicated desktop pools, the storage usage grows and can grow up to the size of hard disk size. As an Administrator you need to check the data stores and set the warn messages correctly. You want to be informed when you really over-provision your data stores. View Administrator helps you during the creation of a desktop pool a bit and shows you some usage figures. The other warning is when your used space gets close to your total space of the data store.

The components that controls the Linked Clone creation is the View Composer. The service must be installed on the same machine as the vCenter. Inside of the parent virtual machine you install the View Agent with the View Composer service. All these components are required. You need to have View Composer configured for the vCenter inside of View Administrator.

When you create a Linked Clone Desktop Pool View Connection Server will send the request to View Composer to create a new Replica and Linked Clones, do the customization and make it available to View Connection Server. The Agent inside of the Virtual Desktop takes care about persistent and disposable data and points them to the correct data disk.

Linked Clones do have several data disks. The first is the OS Disk. This disk holds all information that are required to link the Linked Clone to its parent. At the same time a
second disk is created that holds all information that are added during the customization. During the creation of a Linked Clone desktop pool you can define where the "Linked Clone" OS Disk will be stored. The third disk is the Persistent Disk. This disk holds the Windows User Profile information. You do not need to create a dedicated disk for this, but if you do a refresh, recompose or re-balance operation the user data is kept. This is a fully independent VMDK disk and can be added to a different virtual machine. So if you do not create a separate persistent disk the User Profile will stored in the OS Disk. During the creation of the Desktop Pool you can decide if you want to store the persistent disk on a different data store than the OS Disk. The last disk is the Disposable-Data Disk. This is a non-persistent disk to store the pagefile and the temp files. This is very nice because these files are not required to be stored and would increase the OS Disk size. The disk will be placed in the same data store as the OS Disk. The size of the initial disk can be defined but will dynamically increased if needed.

How does View composer creates Linked Clones?

View Composer is the service that creates the Linked Clones. Here is a brief overview about the actions that are taken to provide new Linked Clones:

  1. View Composer creates a replica from the parent virtual machine. Basically it creates a copy from the selected snapshot during the desktop pool creation
  2. When the replica is created View Composer create a new virtual machine and links this virtual machines main hard disk to the replica
  3. Depending on the configuration View Composer creates also the persistent disk and also the disposal disk
  4. View Composer is customizing the Linked Clone; depending on which type, QuickPrep or SysPrep, there are some slightly differences, but later more
  5. View Manager is creating a snapshot of the linked clone

These are the basic steps to create a Linked Clone. The very interesting part of this process is, that step 1., is only done once. Every other new Linked Clone just need to be linked and that is a matter of seconds. The replica is created as Thin Provisioned disk to save storage space.

If the replica does not have a Linked Clone assigned to it, it will be automatically deleted by View Manager/View Composer. When you introduce a new image version for you Virtual Desktops a new replica will be created and assigned to at least one Virtual Desktop. When you have finished your roll-out the old version will have no Linked Clone assigned to him. This will automatically clean up the replica and free up storage space.

Another little piece to know about step 1. is that if you do not select a specific data store for the replica, but you have selected several data stores for linked clones, a replica will be created on each data store for linked clones. This is a nice feature but can take longer to prepare Linked Clones.

Storage Considerations

Virtual Desktops are normal virtual machines like you create for server, but you will have a lot higher density per host. You will have typically around 8 to 10 hosts per virtual cluster. This cluster will share the data stores for the virtual desktops. If you would have 50 virtual desktops per host and you configured 1.5GB memory for each, this would mean you just need to have 600GB storage space just for the memory (overhead not included). The memory file is stored on the OS Disk data store.

This little example shows that virtual desktops are slightly different because of the higher density you will have. Another piece you need to consider is that because of the Linked Clone and the assignment to the parent the original hard disk will get a lot of read operations. This means you will have a lot of IOPS on this data store. It seems to be a good choice to place Virtual Desktops into several data stores and have a replica on each data store or just have a very fast data store for the replica.

When you decided to have an own Disposable Disk and the initial size is 4GB (and it can grow) you need to put that into your calculation of required storage space. When we use our example from above this would mean 1600GB. This is a decent amount of space. But the good thing is that all disks are Thin Provisioned and therefore not consume the whole space right from the beginning. You need to be careful and check the size of the pagefile from the parent virtual machine. When windows start it will create the file and blow up the file size of your disposable disk. You might not need a large page file.

As said all disks are Thin Provisioned this means that the storage consumption looks low at the beginning. Only the memory if the virtual machines are powered on and the disposal disk will consume a bit of a space. When the time goes by and the users use their desktops the persistent disk and the OS Disk will grow. How much it will grow is not in your hand. You could provide floated desktops and after disconnect the desktop will be refreshed. In this case you can control the storage grow in such a way that you do not allow the users to store anything locally. But you need to find a solution for the situation, that a user will have and wants to have local files. Windows 7 with folder redirection might help.

Reality will be, that you will have dedicated desktops and the user will have some local files and with the usage of folder redirection you can somehow limit it. Most user will save files in My Documents, My Pictures and Download (just to mention some examples). Just redirect these folder to share folders. This does not reduce the amount of storage but you can put this data on less expensive storage.

View Administrator try to help you with storage considerations. When you create a Desktop Pool on the Provisioning Settings Page you define the Max Numbers of Desktops for this pool. Later when you select the parent virtual machine and the data stores this information is used to guide with a calculated storage consumption:

  • Selected Free Space (GB): This column provides you with the information how much free space is available in the selected data stores. This is just a sum of the real free space no calculation included.
  • Min Recommended (GB): Based on the Max Number of Desktops View Administrator calculates the minimum you should have available on your storage.
    • Space for 2 replicas
    • 2 * Memory of VM * # Desktops
    • 20% of the size for the persistent * # Desktops
  • 50% Utilization: (GB): The calculation incorporates a 50% OS Disk growth compared to the parent virtual machine disk for each desktop
    • Space for 2 replicas
    • 50% of replica disk * # Desktops
    • Memory of VM * # Desktops
    • 50% of the size for the persistent * # Desktops
  • Max Recommended (GB): This calculation incorporates that each desktop will consume the maximum space for his Disk
    • Space for 2 replicas
    • 100% of replica disk * # Desktops
    • Memory of VM * # Desktops
    • 100% of the size for the persistent * # Desktops

You can see this little calculations help to see what storage space you need or you can expect. One more information regarding the replica. I mentioned earlier that for each data store you for OS Disks a replica will be created plus a space requirements for one more replica. You can set an option that you want to place the replica on a different data store. In this case you have only one replica per desktop pool. This sounds good, but keep in mind that all Linked Clones are accessing this replica for read operations for the data they do not have in their OS Disk. This means in the best case situation nearly all read operations. This increases the requirements for IOPS for this data store. This kind of setup asks for SSD hard disk. If you think about that these hard disk are do have not the capacity but for just storing the replicas you have plenty space.

Customization via QuickPrep or Sysprep

A Linked Clone desktop pool has 2 options for the customization. The first option is QuickPrep and the vSphere standard one via Sysprep. Both will probably do the same but in a slightly different way. The reason for customization is to make a virtual machine unique.

Quick Prep is only available for Linked Clones Desktop Pools and is designed for use with View Composer. The following points provide you with a simple overview:

  • Uses the same SID as the parent virtual machine
  • You can run additional customization script after Linked Clones are created, refreshed or recomposed
  • Joins the Linked Clones to the active Directory (also in the OU that you can define for each Desktop Pool)
  • Linked Clone will get a Unique ID in the Active Directory
  • The Linked Clone will not get a new Unique ID after desktop is refreshed, recomposed
  • Is faster than Sysprep

Sysprep can be used to customize linked clones but is not the first choice. The following points provides you with an overview:

  • Customization script can be created with Microsoft Sysprep tools
  • Creates a unique local computer SID
  • You can run an additional script when the user first logs in
  • Can join the computer to the Active Directory domain
  • Linked Clone will get a Unique ID in the Active Directory domain
  • Creates a new Unique ID every time the customization runs
  • Keeps the Unique ID when you refresh the desktop
  • Creates a new Unique ID during recompose
  • If you recompose a desktop, you will also start a customization

I personally prefer QuickPrep but if you already have customization scripts for Sysprep you might go with this customization. I don’t like that Sysprep will generate Unique ID when I recompose the desktop. This could leave dead entries in the Active Directory that I need to take off in a different way, and don’t forget that Sysprep customization takes longer. Most of the time QuickPrep is all what you need plus with additional script you can add, you can do additional customization if you need. The scripts can be in VBScript, normal BAT files or every EXE you have installed on the parent virtual machine.

Linked Clone Maintenance

This part shows the real difference to the Full Virtual Machine Desktop Pool. Linked Clones offers you a lot more options regarding maintenance work and this in a very quick way.

Refresh a Desktop

This task is is setting the OS Disk from a Linked Clone disks back to its original state. It will not reset the persistent disk. After performing the task the storage consumption will be lower again as changes to the linked clone are gone.

You can set this task automatically when the user logs off the linked clone or after a period of time.

Executing this task manually makes sense for example when a user complains after an installation or virus/trojan infection. You can have the user back on track in a short period of time. Only issues are virus/trojan that are installed in the user profile or registry. These ones you can’t get rid of with a refresh.

Here are the steps to refresh:

  1. Select the Desktop Pool you want to refresh
  2. Select from the tool bar View Composer –> Refresh to open the Assistant
  3. the first screen let#s you define the scheduling for the refresh. Here you can set a specific time for the refresh, by default it is the current time. You also can define how the refresh will be executed. Force the users to log off or wait for user to log off first, for all other desktops the refresh will start immediately.

That is all you need to do. This action will refresh all Linked Clones in the selected Desktop Pool. If you want to refresh only selected Linked Clones you need to do the following steps to start the assistant:

  1. Select the Desktop Pool you want to refresh
  2. Select Inventory from the tab bar
  3. Select the Linked Clones you want to refresh. You can use Shift- or Ctrl-Key to select more than one Linked Clone
  4. Select from the tool bar View Composer –> Refresh to open the Assistant

Recompose Linked Clones

Software evolves and you might want to update your base image with the newest patches or new software. In this case you update the the base image you already used and after you finished with it, you create a new snapshot on the base image virtual machine. With a recompose you can not upgrade an OS, it needs to be the same one.

After you have an updated base image snapshot you can plan the recompose. You have two options. The first option is doing the recompose immediately or, better, schedule the recompose to a off-peak time. You also need to decide if you want to recompose all desktops or just selected ones.

Here are the steps:

  1. Select the Desktop Pool you want to recompose
  2. Select from the tool bar View Composer –> Recompose to open the Assistant
  3. Now you need to select the new snapshot you want to use for the recompose.
    You also can change the default image, this means that all new Linked Clones in this Desktop Pool will use the new snapshot.
  4. In the new screen you can define the scheduling. Here you can set a specific time, by default it is the current time. You also can define how the recompose will be executed. Force the users to log off (very brutal) or wait for user to log off first, for all other desktops the recompose will start immediately.

After the recompose settings are accepted and starting a new replica is created based on the selected snapshot. If you have selected a special data tore for replicas, it will be created on that data store. If not a replica will be created on each data store that can hold linked clones for that desktop pool. Verify that you have enough storage space left on each data store you need.

You can see that rolling out a new desktop image version is pretty simple and quick. When you use the the option to wait for users to log off you need to verify that at some point the user really log off.

Wen you have a dedicated desktop pool with an own persistent disk the user will also keep the settings and personal configuration. If you do not have an own persistent disk the OS disk will be erased and also the user settings.

When you want to recompose just selected linked clones you have to do the following steps:

  1. Select the Desktop Pool
  2. Click Inventory from the tab bar
  3. Select the Linked Clones you want to recompose. You can use the Shift- or Ctrl-Key to select more than one Linked Clone
  4. Select from the tool bar View Composer –> Recompose to open the Assistant

Rebalance Linked Clones

Rebalancing Linked Clones try to evenly distribute Linked Clones among the selected data stores. If you use only one data store this task does not make sense to execute. You will get unevenly distributed Linked Clones when desktops are made available but later are deleted. During the rebalance task the Linked Clone will be refreshed as well.

Here are the steps to rebalance:

  1. Select the Desktop Pool you want to rebalance
  2. Select from the tool bar View Composer –> Rebalance to open the Assistant
  3. The first screen shows you a message which Linked Clones can be rebalanced and that a refresh operation is necessary
  4. In the second screen you can select the schedule and also if you want to forced log off.

About these ads

Responses

  1. Good info. Knowledgeable author.

  2. what´s happen if i recompose pool linked clone with persistent disk ? All persistents disk keep with all datas ?

    • all data on persistent disk are maintained across refresh and recompose operations

      @vijayar

    • nothing’s happen to data. all disk keep with datas.

  3. [...] I think most people know that recomposing or refreshing will reclaim any space savings that you may have lost with the daily growth of the linked clones. I don’t want to spend too much time on the linked clone architecture since you can get all that information here: http://blog.vhowto.info/2011/01/05/vmware-view-4-5-linked-clones/ [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: