In Part 8 of this Boring series I will be setting up an Instant Clone Desktop Pool. This is one of the coolest features announced of Horizon 7 in my opinion! You may have heard of Project Fargo (aka vmFork) announced during the keynote speech of VMworld 2014. This is the result of that project! Instant Clone gives you the ability to rapidly deploy VMs (children) from a already powered on and running VM (parent). The child clones share the memory and disk of the parent for Reads while Writes are placed in a delta disk. To read more about Instant Clone technology check out this VMware Blog post.
vBoring Blog Series:
Creating the Instant Clone Template:
For a guide to setup your Master Template follow my previous post: https://www.virtuallyboring.com/vmware-horizon-view-7-create-master-desktop-template/
There are a few additional stipulations that needs to be met:
Windows 7 and Windows 10 are the only supported operating systems for Instant Cloning
Only VSAN and VMFS datastores are supported; NFS and local storage are not allowed
Ensure your template is VM Hardware Version 11
When installing the Horizon View Agent, ensure you enabled the VMware Horizon Instant Clone option:
Once you have the template completed, shut it down and create a snapshot of it. The template must be in a powered off state with a snapshot. View Instant Clone setup won’t accept the template unless both are satisfied.
Preparing Horizon View:
There are two items that need to be configured in the View Admin Console. First an Instant Clone Engine Domain Administrators needs to be defined. Browse to View Configuration -> Instant Clone Domain Admins -> Add.
The user account you add must have certain Active Directory permissions in order for Instant Clone to work properly. For a list of permissions click here.
The last setting that needs to be configured is View Storage Accelerator. Ensure it is enabled by browsing to View Configuration -> Servers -> vCenter Servers tab -> select your vCenter instance then Edit -> Storage tab then check Enable View Storage Accelerator:
Create Instant Clone Pool:
With all the required tasks completed above, you are now ready to create the Instant Clone pool! In the View Admin Console, navigate to Desktop Pools -> then click Add:
Select Automated Desktop Pool then click Next:
Instant Clone Pool requires Floating user assignment. Click Next:
Select Instant Clones and your vCenter instance, then click Next:
Enter an ID and Display name then click Next:
The default settings should be good. You can tweak them depending on your environment. I like to enabled HTML Access. Click Next:
Enter a naming pattern for the Clones. For example, my VM names will look like this: VIEW-IC-01, 02, 03, etc…. If you want to have triple digits just use {n:fixed=3}
Select the max number of VMs you want the pool to have then select how you want them provisioned. If you select Provision machines on demand the VMs won’t be deployed until a user attempts to launch the Instant Clone pool. If Provision all machines up-front is used then the pool will be deployed with number in the Max number of machines field. For my lab I will select the second option so I can play with Instant Clone elasticity.
Click Next:
If you are using VSAN make sure you select Use VMware Virtual SAN. Click Next:
Make your selections for each setting. Once finished click Next:
Browse to the Active Directory container where you want to place the Clones computer objects. Click Next:
Check the box to Entitle users after this wizard finishes. If you are satisfied with the information click Finish:
On the Entitlement pop up window, click Add. I created an AD group called G-View-InstantClonePool. Any user assigned to this group will be entitled to an Instant Clone workstation. Click Close:
Back in the vSphere Client you may have noticed View created new folders with VMs that are oddly named. Each folder has a purpose for Instant Clones:
ClonePrepInternalTemplateFolder
cp-template-xxxx: This is the template VM that is used to create your Instant Clones. It was created from your master image.
ClonePrepParentVmFolder
cp-parent-xxxx: The number of these VMs should match the number of hosts in your cluster. I have 3 hosts so I have 3 cp-parent VMs. Each ESXi server will have 1 of these powered on and in memory to create the Instant Clone VMs.
ClonePrepReplicaVmFolder
cp-replica-xxxx: This VM is used to create the cp-parent VMs. It is used to provision additional cp-parent VMs.
ClonePrepResyncVmFolder
If you want to update the Clones with a new image it will create a VM in here for staging
Once the tasks complete you should see your Instant Clone workstations deployed and showing Available. They are ready for use!
Elasticity with Instant Clones:
Now that we have a functioning Instant Clone pool, I thought I’d see how well the pool can expand! I am going to expand my pool of 3 to 50! To do this click Edit while browsing the pool -> Provisioning Settings -> then change the Max number of machines to 50. Note: This will only work if you have selected Provision all machines up-front. Click Ok:
And that’s it! Time to watch vCenter pop out massive amounts of VMs. Watching them come online with correct DNS names and IP addresses gives satisfaction
Within 4 minutes I had over 20 workstations Online and showing Available!
When it finished I was at the 11 minute marker. 11 minutes to have 50 workstations up and ready for use?? That is just insanely awesome!!
And now let’s shrink the pool. Click Edit while in the Instant Clone pool -> Provisioning Settings -> now lower the Max number of machines then click Ok:
View should start to remove VMs until it reaches the new pool size. View kept the last 5 workstations in the pool. Essentially it doesn’t matter which VMs remain, it’s a floating pool where all machines are the same!
Updating the Instant Clone Image:
Updating the Instant Clone environment is almost as easy as the deployment. Go back to your Master Image you used to create the pool and power it back on. Make all the changes you want such as Microsoft Updates or installation of additional applications. Once finished, shut it back down. You can have multiple snapshots on your template VM. If you want to clean it up go ahead and right click the VM, go to Snapshots -> Snapshot Manager. Click Delete All to merge the original snapshot from the initial setup. Once the merge completes right click the VM again, Snapshot -> Take Snapshot. Give it a descriptive name then click Ok:
Now that you have a new snapshot of the Master Image, switch back over to the View Admin Console. On your Instant Clone desktop pool click Push Image then click Schedule:
Here, you select when the Instant Clone pool gets refreshed with the new snapshot template. You have two options, Force Users to log off will re-provision the entire pool at the set time. The second option is Wait for users to log off. When a user logs out of a workstation the VM will be redeployed with the new snapshot template.
If you have a non critical update the Wait for users to log off has less of an impact for the users. If it is a required update then it would be best to select a time when the least amount of users will be impacted and use Force users to log off:
If you selected Force users to log off this is the message users will receive. It can be edited in the Global Settings of View:
Note: If you wish to change the message the View Global Settings can be found under View Configuration -> Global Settings:
Ensure everything is set to your liking then click Finish:
You can monitor the progress of the image update on the Summary tab of the Instant Clone pool. The Pending Image field will now be populated with the current status:
Once the update is complete the Pending Image will go back to None:
You now have a updated Instant Clone pool! It even redeployed using the first available names in your naming scheme!
Today’s Limitations of Instant Clone:
There are some limitations with the current release of Instant Clone:
Floating desktops only; no support for dedicated desktops
Only supports Windows 7 and Windows 10 virtual desktops
Microsoft Remote Desktop Services is not supported
Scales to 2,000 desktops
Only a single vCenter can be used
Only a single vLAN is supported
VMware Hardware Version 11 or newer is required
No NVDIA GRID; limited SVGA options
Only VMware Virtual SAN or shared VMFS datastores are supported for storage
Data persistence and desktop personalization is provided by using VMware App Volumes, User-Writeable Drives, and VMware User Environment Manager (UEM)
Profile Management:
To make Instant Clones truly usable from a end user perspective there needs to be user profile management. VMware has product called User Environment Manager. Blog post coming soon!!
本文转自学海无涯博客51CTO博客,原文链接http://blog.51cto.com/549687/1981975如需转载请自行联系原作者
520feng2007