«

»

Oct 07 2010

VMware View 4.5 Linked Cloning Operations Explained (Part 1)

Advertisement

A document created by VMware’s Keith Johnston explains how VMware View 4.5 manages Linked Clone operations. These LC operations are those tasks executed by View Connection servers through vCenter Server on a daily basis for the purpose of Provisioning and Customisation, Refresh, Re-Compose and Rebalance.

I have to mention here that the VMware Desktop Team have done an amazing job streamlining these operations and making VMware View 4.5 smarter and more efficient than its predecessor.

Before moving forward I recommend reading of for VMware View 4.5 Linked Cloning explained as this article to a certain extent is a continuation of my previous article.

Using the words in this document with few modifications and some pictures I will explain how View 4.5 Linked Clone operations work and how they differs from previous VMware View releases. This is a two part article and this is the first part. Part two can be found at http://myvirtualcloud.net/?p=1246

Provisioning

image

The diagram above demonstrate where in the VMware View stack each tasks is originally triggered, and the diagram below demonstrate where the tasks is executed. If you are not familiar with the VMware View stack I recommend reading of the VMware View 4.5 Architecture Planning Guide.

image

 

  1. View Manager creates the linked clone entry in ADAM and puts the VM into the Provisioning state.
  2. View Manager calls View Composer to create the linked clone.
  3. View Composer Server creates the machine account entry in Active Directory for the new clone and creates a random binary password for the newly created computer account.
  4. If there is not yet a replica for the base image + snapshot in the target datastore for the linked clone, View Composer creates the replica in the target datastore (unless a separate datastore is being used for all replicas, in which case a replica is created in the replica datastore).
  5. View Composer creates the linked clone using the vCenter API.
  6. View Composer creates an internal disk on the linked clone. This small disk contains configuration data for QuickPrep/Sysprep. It is also used to store machine password changes that Windows performs every 30 days as per policy setting and stores the machine account password retrieved from Active Directory in this disk. This ensures domain connectivity is maintained when a checkpointed desktop is refreshed.

Customisation

  1. View Manager puts the VM into the Customising state.
  2. If the pool is configured to use Sysprep, View Manager calls the vCenter API customizeVM_Task to customise the VM with the customisation specifications. Note that any domain / administrator information in the customisation specification is not used. The VM is joined to the domain using the guest customisation information entered through the View UI.
  3. View Manager powers on the linked clone.
  4. When the VM powers on, inside the Guest OS on the linked clone, the View Composer Agent sees that it is starting for the first time and calls NetJoinDomain with the machine password cached on the internal disk. The machine is now joined to the domain. Note that this is done for both QuickPrep and Sysprep.
  5. If the View pool is configured to use Sysprep, Sysprep is now run on the linked clone from within the guest.
  6. If Sysprep is being used, the View Composer agent waits for Sysprep to finish before notifying the View Agent that customisation is complete.
  7. The View Agent waits for the View Composer Agent to say that customisation is complete. When customisation is complete, the View Agent sends a message to the View Manager server.
  8. The View Manager Server powers off the clone and takes a snapshot of the customised, powered off clone. The snapshot is called “vdm-initial-checkpoint”.
  9. The linked clone has now been created, customised, and a snapshot has been taken in the customised state. View Manager puts the linked clone into the Provisioned state. If the VM is then powered on, it moves into the Available state.
    The figure below demonstrates the initial snapshot called “vdm-initial-checkpoint” created during the customisation process.

 

image

While a linked clone is powered on and the View Composer Agent is running, the View Composer Agent tracks any changes made to the machine account password.

In many Active Directory environments, the machine account password is changed periodically. If the View Composer Agent detects a password change, it updates the machine account password on the internal disk that was created with the linked clone. This way when the linked clone is reverted to the snapshot taken after the customisation during a refresh operation, the agent will be able to reset machine account password to the latest one.

 

Refresh

As of View 4.5, a refresh operation now simply triggers a revert operation to the snapshot that was taken after customisation is completed. This allows View to preserve the customisation performed by Sysprep. Prior to View 4.5, a refresh operation essentially threw away the current OS disk for the linked clone and created a brand new one.

 

image

 

  1. View Manager puts the VM into the Maintenance state.
  2. View Manager reverts the VM to the post-customisation snapshot “vdm-initial-checkpoint”. Only the OS disk is checkpointed. All other disks are created as independent disks and are not part of the snapshot.
  3. When the guest starts back up, the View Composer Agent detects if it needs to update the machine account password. If the machine account password saved in the internal disk is newer than the one in the registry, the agent will update the machine account password from the one stored on the internal disk to maintain domain connectivity.

image

In the second and final part of this article I will cover Re-Compose and Rebalance processes. Keep tuned.

Part two of this article can be read at http://myvirtualcloud.net/?p=1246

Similar Posts:

Permanent link to this article: http://myvirtualcloud.net/?p=1237

11 comments

3 pings

Skip to comment form

  1. Trc

    Hi,
    How can I run sysprep ?

  2. Trc

    Where I have to install Sysprep for windows7.
    Do I need to run in VM or In Vcenter server and which location i have to copy the sysprep file.
    While Deploying pool from Vmware view manager console I didnt find any option stating that select the Preparation technology between Quickprep and Sysprep.

    I strucked here.

  3. Craig

    Hi there. Thanks for the great articles on View 4.5. I am stuck at one point and only get vague error messages from View so don’t know what to do. Above in the Customizing section, I get to step 2 in my linked clone pool creation and it fails. The errors state “Cannot complete customization”. No explanation as to what is failing but just that it won’t work. The VMs don’t get to the point of even powering on. I feel like I am missing something small but I just can’t figure it out. Any suggestions?

    Thanks!

  4. Andre Leibovici

    Hi Craig, if you have the Event Database setup you should be able to get some additional information about the recurring issue. Check if you have View Agent installed in your GuestOS, check that View Agent was installed with the View Composer component (full install). Check that View Composer service is properly active and running in your vCenter server. That should give you some initial troubleshooting steps.

  5. Mrlinky

    Thank you very very much for this! I`ve searched a whole while and already thought im the onlyone who thinks about that.

  6. Magnus

    Hi,
    in the replica virtual machine directory i can see a snapshot file.
    What is that used for?
    What updates are written to that file?

    thanks in advanced.

    regards,
    Magnus

  7. Andre Leibovici

    @Magnus
    The snapshot you see in the replica is used as a pointer and it will not grow. Each individual virtual machine has it’s unique folder and also have a snapshot for Refresh operations purpose. The VMDK file that will grow (delta) is in the virtual machine folder.

  8. ak

    Hi,

    In customization, I think the sysprep should run first before the netdom command is executed. If sysprep is not changing the vm name this can cause multiple vms with same name joining the domain and create an inconsistent state for the new vm ad account.

  9. Andre Leibovici

    @ak
    You have two options when using Linked Clones – Sysprep and QuickPrep. If you select quickprep the SID of the machine is changed, however with QuickPrep the SID is not changed. Unless you have specific requirements I recommend you using QuickPrep.

    As for Sysprep, it is actually changing the VM name during the customization process.

    After the customization is complete the VM is shutdown and a snapshot is taken. After that Refresh operations are based on revert snapshot operation.

    Andre

  10. mcd

    @Andre Leibovici

    Hi,

    Are you saying that you recommend NOT changing the SID for the linked clones? I think that will cause problems in a domain environment.

    Also, as ak pointed out, why join the domain first, if the sysprep changes the SID and the computer name after?

  11. Andre Leibovici

    @mcd
    No, SID matters and you may read this article from Mark Russinovich.
    http://blogs.technet.com/b/markrussinovich/archive/2009/11/03/3291024.aspx

    In saying that, most applications today to not use SID for anything, however few of tehm such as McAfee EPO and WSUS still use it.

    The Domain Join is purely based on my previous experience with VMware View Agent. Perhaps it was a bug, however joining the domain was a way to make sure it always worked.

    Andre

  1. - Cliff Davies

    [...] Despite the virtual machine been provisioned with 32GB of storage, when using Linked Cloning each VMDK created will show Provisioned Size of 32GB. By default VMs created by VMware View Composer will have two disks, being one pre and one post initial snapshot created by VMware View. This snapshot is used for Refresh operations. (find out more about the Refresh operation at my article VMware View 4.5 Linked Cloning Operations Explained) [...]

  2. - Cliff Davies

    [...] 4.5. I have previously written about how Linked Cloning operations work under the hood, read on Part 1 and Part 2 of my article “VMware View 4.5 Linked Cloning Operations Explained”. The article [...]

  3. Moving Linked Clone VM to different LUN without Data Loss » myvirtualcloud.net

    [...] VMware View pool of persistent desktops was created and provided to developers using the Linked Cloning technology. Over time the developers deployed their own applications and created content in their virtual [...]

Leave a Reply