This is part three of a ten part series on Installing & Configuring VMware View 4.5. To read parts 1 and 2 click the following respective links.
- Installing & Configuring VMware View 4.5 Part 1
- Installing & Configuring VMware View 4.5: Part 2 – Configuring Local Mode
I am going to show you how to setup your View Composer Database, install View Composer, setup your linked clone pool along with some best practices, and connect to your linked clone pool.
Linked Clone technology is a catalyst for getting your Virtual Desktop project approved. By utilizing linked clones you can dramatically reduce your SAN storage footprint, which in turn will lower your capital expense. Furthermore, your operational expenses are reduced because now you only need to manage one snapshot which will be deployed to all of your users making upgrades and backups completely painless. You still will need to perform a TCO for your business but I have no problem stating that your operational expenses will be lower, your capital expense may be a break even or higher depending on what platform and design path you choose. The bottom line is if you are looking at a virtual desktop proof of concept you absolutely cannot leave out evaluating linked clones.
Creating and Configuring the View Composer Database
In order to start using Linked Clones you need to setup a SQL or Oracle database and then install the View Composer Services on your vCenter server. The vCenter Server will talk to your SQL or Oracle database through an ODBC connection that you have to configure. For the purposes of this article I will be showing you how to setup a SQL Database as I don’t have any Oracle test databases. For help with Oracle please reference the View 4.5 Installation Guide.
- SQL 2005/2008 Server – for my guide
- ODBC Connection
Database Support Options Below:
Grid provided by VMware
- My SQL 2008 Database is on a remote machine and not installed locally on my vCenter Server which is a best practice. Sign into your SQL Server and Launch “SQL Server Management Studio” typically found by going to Start à Programs à Microsoft SQL Server 2008 à SQL Server Management Studio.
Sign into the Database Engine Portion with a user that has access to create databases
- Right Click the Databases folder in the left hand navigation pane and choose the option “New Database”.
- Give the Database a Name, mine is “ViewComposer”. You should be able to accept the rest of the defaults and then click the OK button and exit the SQL Server.
Create the ODBC Connection
- On the vCenter server add an ODBC connection. Click the Start Button à Administrative Tools à
Data Sources (ODBC). Click the System DSN tab, and then click the Add button.
- Select SQL Server Native Client 10.0 and then click the Finish button.
- Give your ODBC connection a Name, mine is “ViewComposer” and then choose the SQL Server that you created the ViewComposer Database on. Click the Next button to continue.
- Enter in the SQL Server Authentication ID and Password below. Also ensure that “Connect to SQL Server to obtain default settings for additional configuration options” is checked. Click the Next button to continue.
- Place a check mark next to “Change the default database to” and select the “ViewComposer” database that you created, if you don’t do this it will not work. Furthermore, I learned the hard way that you must keep the check marks next to “Use ANSI quoted identifiers” & “Use ANSI nulls, paddings, and warnings”. If you do not have these checked when you go to install the View Composer Service on the vCenter server you will get to the very end of the installation and then it will give you a message like the screenshot below. Click the Next button to continue.
- Ensure that you have a checkmark next to “Perform Translation for Character Data”, and then hit the Finish button.
- Click Test Data Source to ensure you have a proper connection to your database. You should get a message saying “TESTS COMPLETED SUCCESFULLY” if not then check your settings again.
Install View Composer
Now that the database has been created and the ODBC connection is configured properly we need to go ahead and Install VMware View Composer on the vCenter Server. The View Composer file name is VMware-viewcomposer-2.5.0-291081.exe, obviously as updates are made the build number will change at the end.
I had an issue when I tried to install View Composer for the first time where my firewall was locked down through Group Policy. I had to take my vCenter Server out of the Group Policy before I could finish the install, this may happen with you as well.
- Run VMware-viewcomposer-2.5.0-291081.exe as an administrator, and then click the Next button to continue.
- Click the Next button
- Accept the license agreement and click Next
- Choose the installation directory and click Next
- Enter the Database Information, if you get this information incorrect the setup will not continue. The source DSN needs to match the name that you gave your ODBC connection. I named mine “ViewComposer”, so that is what I entered in the first line. Enter in the SA username/password and click the Next button.
- Accept the default SOAP Port and click the Next button.
- Click the Install button
- Click the Finish button
If you go into services you will see the VMware View Composer Service started.
View Composer Installation Troubleshooting
I had my fair share of issues when I tried installing View Composer. My first issue was the firewall was locked down through GPO so I had to remove this. The second issue which took me longer to figure out was when I was at the end of the VMware View Composer Installation I got a message stating that the services wouldn’t start.
According to VMware Knowledgebase this usually occurs because the HTTP SSL Service wouldn’t start as the View Composer Service depends on it, or I need to run View Composer with higher access. In my case the HTTP service was already running . So I thought I would try the second option. When the services failed to start I left the Installation running and opened services.msc, I changed the View Composer Service from local system to the built in “Network Service”. This still wouldn’t allow me to start the View Composer Service and finish the installation. Finally the issue was resolved when I ensured that I had all of the correct checkmarks during the ODBC connection setup.
I have also heard that if you create the View Composer database with not enough permission you can get this error. You want to ensure the SA account has DBO owner privileges over the database.
Prepare the Master Virtual Machine
By leveraging Linked Clones we can take one “Parent” or Master Virtual machine and make that the default VM in our linked Clone Pool. The parent VM then creates a replica that is used to create all of the desktops in the linked clone pool, which I will show you how to create later. However, before we can start the parent VM needs to have several key items performed to it.
- Install View Agent on the VM with the View Composer Option à reference Installing & Configuring VMware View 4.5 Part 1 for instructions
- Install VMware Tools on the VM
- If the Parent VM is Windows XP and your Active Directory runs on Windows 2008, apply an update patch on the Windows XP virtual machine http://support.microsoft.com/kb/944043/en-us
- The Parent VM can only have one volume! View Composer does not support multiple disk partitions.
- Disable Hibernation on the Parent VM to reduce the size of linked-clone OS Disks.
Power off the Parent Virtual Machine and then take a snapshot. If you do not power off the VM before you take the snapshot you will get an error message when you try to add the VM to the linked clone pool.
- Right Click your Parent or Master VM and choose Snapshot, Take Snapshot. In my case I am using a Windows 7 Professional Virtual Machine with customized settings.
- Give the snapshot a name and description if you want.
- Snapshot has been created successfully.
Prepare Active Directory, vCenter, and vSphere
Sign into vSphere and right click your Datacenter à New Folder
I named my new Folder Linked Clones
Create a new Organizational Unit in Active Directory that will store all of your Linked Clone Desktops.
Open Active Directory users and Computers (dsa.msc) and then create a new Organizational Unit.
Create a user account in Active Directory for View Composer
- This account must be created in the same domain as your View Connection Server host
- The account doesn’t need to be a domain administrator but does need to have the following permissions to the Linked Clone OU we just created: Create Computer Objects, Delete Computer Objects, Write all Properties, Read Permissions, Read All Properties, and List Contents.
- Ensure that these account permissions apply to all child objects in the container.
- Open VMware View Administrator à View Configuration à Servers à Select vCenter à Click Edit button, Enable View Composer. Furthermore, click the Add button under the View Composer Settings. Then Type in your domain and the username/password of the account we created in step 3.
In the VMware View Administrator à View Configuration à Servers à the vCenter Server Icon changes as shown below.
Create Linked Clone Pool
Are you still with me, because we are very close? The last major step is creating the linked clone pool that will serve as the repository for all of our virtual desktops.
- Open VMware View Administrator à Inventory à Pools à click the Add button. When the Add Pool wizard comes up choose “Automated Pool”, and click Next.
- Choose Dedicated and place a checkmark next to “Enable Automatic Assignment”, and then click the Next button. Dedicated means that each user has their own virtual machine. Floating means the desktops will be given out to users randomly.
- Select “View Composer Linked Clones” and then click the Next button.
- Give the Pool a Unique ID as well as a Display Name and then click the Next button.
- Make your pool setting customizations and then click the Next button. Please reference pages 104-108 of the VMware View 4.5 Administrator Guide for descriptions of each setting.
- Persistent Disks are a key factor to a proper linked clone configuration. If you refresh, recompose, or rebalance your parent VM then all of your user’s settings will be gone! It’s imperative that you create a persistent disk to store users profile information. The default size setting is 2GB; I changed mine to 4GB because our users have a lot of profile information. The good news is that you can go back in later and change the size of your persistent disks if they are not working out for you.
- You can either use a desktop naming convention or manually enter in every computer name you want as well as the associated users to that computer. For the sake of testing I chose to do a pattern. My pattern basically is stating that each desktop I provision will start with Laptop- and then a number. Since I set the number to only one digit (n:fixed=1), then my names will be Laptop-1, Laptop-2, Laptop-3. If I had said N:fixed=2 then the names would have been Laptop-01, Laptop-02, and Laptop-03. For more help on Desktop Naming please check the VMware View 4.5 Administrator Guide pages 102-104.
- Click The Browse Button next to Default Image, and then click the Browse Button again next to Parent VM.
- Select the Parent VM and click the Ok button. If you don’t see any parent VM’s show up, re-follow my directions on preparing the parent VM.
- New to View 4.5 you can now have your linked clones use Local Mode; therefore, I put a checkmark next to “Publish snapshot to Transfer Server repository for use with Local Mode” and then click the OK button.
- Select the Linked Clones folder that you created in vSphere earlier and click the OK button.
- Select Your ESX Cluster and then click the OK button.
- Select your Resource Pool (this is created in vSphere, you don’t have to create one) and then click the OK button
- There is a lot of planning and consideration that goes into just this portion of the setup. It is a best practice to store the replica (Master) Virtual Machine on high performance disk like SSD or Fiber Channel, and the linked clones can be stored on slightly slower disk like SATA. You can see that my Linked Clones are set to use a SATA Datastore and my Replica is using Fiber channel.
Furthermore, you have the option of redirecting disposable files such as paging and temp files. These disposable files are then deleted when the linked clone is powered off. This will slow the growth of your linked clone’s storage size.
Finally, I said that my pool was going to have a max of three desktops. I have one spare desktop powered on for faster access. For instance, let’s say that I was using Laptop-01, Laptop-02 would automatically power on so I always have a spare powered on in case someone needs to use one. The last option is to have the desktops all provisioned at once. Since I only had three desktops in the pool I decided to provision all of them at once.
Click the Next button to continue.
Below is a picture of the View Transfer Server Repository after the Linked Clones were created.
When you chose a Datastore you will get an estimated Min Recommended (GB), 50% Utilization (GB), and Max Recommended (GB). My screenshots below do not show these values because I changed my DataStore Configuration later on.
- Selected Free Space – is the total available space on all of the datastores you select
- Min Recommended – is just that the minimum recommended space
- 50% Utilization – shows the recommended storage space when the linked clones are 50% the size of the parent VM.
- Max Recommended – recommended storage when the linked clone is almost the full size of the parent VM.
Below these screenshots I have gone into further detail on using the storage overcommit and sizing.
Choose to put Replica on different datastore.
Put the Replica on Fast Fiber Channel Disk
Allows you to customize how aggressive you want to be with your storage. As the level increases, more linked clones can fit on the Datastore leaving less space for the individual clones to grow. With Storage Overcommit linked clones can use a logical storage space several times the physical capacity of a Datastore.
- None – Storage is not overcommitted
- Conservative – 4 times the size of the datastore, Default option
- Moderate – 7 times the size of the datastore.
- Aggressive – 15 times the size of the datastore.
To illustrate storage overcommit let’s say you have 5 full virtual machines that are each 20GB this would require a 100GB datastore. If you set your storage overcommit level to conservative you can have 4 times that number of linked clones, remember linked clones take up a fraction of the space of the full VM. Now you can have 20 linked clones on your 100GB datastore.
The most important thing to remember is that you want to be monitoring your storage especially if you use an Aggressive strategy. An Aggressive storage overcommit can actually be useful when you are using Floating desktops, especially if you refresh/recompose often to ensure the clones never grow in size.
There are quite a few factors to consider when trying to properly size your environment. I can’t review every scenario but here is a list of a few of those factors:
- Amount of Memory on the Parent VM – the more memory the more space is consumed
- Frequency of Refreshes – the more your refresh the less space your clones will consume
- Redirecting page and temp files – I addressed this in step 6 with disposable file redirection
- If you configure persistent disks – reduces profile bloat on the linked clones
Sizing Formula for Linked Clones
(Provided By VMware Administrator Guide)
My next article “Managing Linked Clones” will delve deeper into storage sizing.
- Review your settings and click the OK button.
Select the Domain that you configured in step 4 of the Active Directory preparation. Then chose the AD container that you created earlier for your Linked Clones by clicking the Browse Button.
In order for your linked clones to operate as unique computers they need to either have QuickPrep or Sysprep done to them. The major difference between the two is that Sysprep generates a unique SID and QuickPrep does not. You may think this is grounds for not using QuickPrep but there really aren’t too many applications that require a unique SID like you may think so test first!
SysPrep is only supported on vSphere 4.1. Other than the SID issue QuickPrep and Sysprep basically do the same thing but Sysprep takes quite a bit longer to run so I am using QuickPrep for my test.
Select the Linked Clones Organizational Unit that you created, and then click the OK button.
- Click Finish button after reviewing
- If you jump back over to vCenter you will see the following tasks take place. After all of the tasks are completed one of the linked clones will be powered on. If you remember during the setup I configured the pool to have one spare powered on desktop (Step 7).
Finally we need to add Entitlements to the Linked Clone Pool. To do this open VMware View Administrator à Inventory à Pools à Click the Entitlements button à Click the Add button to add your users. A green checkmark is then placed in the Entitlement column.
Testing the Linked Clone Pool
Whew, you finally made it to the end! Now to the fun part let’s actually test our Linked Clone Pool.
Start VMware View Client and sign into the View Connection Server. I have entitlements to a Manual Pool and now a Windows 7 Linked Clone Pool.
Since I already have one of the linked clones powered on I signed into my desktop in less than 20 seconds. After I signed into my desktop one of the other linked clones automatically powered on because I have the setting to always have one spare powered on which dramatically reduces the sign in time to your virtual desktop, without this setting it takes about 5-6 minutes.
If I shut down my VM and then sign back in I will get the same VM and it will power on
Leveraging Linked Clones can help you dramatically reduce your storage footprint especially when coupled with storage overcommit. My next article in the series will discuss managing linked clones where I will take a deep dive into Windows 7 configuration best practices, and provide more detail on storage sizing. In addition, I will be covering refresh, recompose, and rebalance stay tuned and thanks for reading!
- Installing & Configuring VMware View 4.5 Part6: – Juniper SSL VPN
- Installing & Configuring VMware View 4.5 Part 1
- Installing & Configuring VMware View 4.5: Part 4 – Managing Linked Clones
- Installing & Configuring VMware View 4.5: Part 2 – Configuring Local Mode
- VMware View 4.5 Juniper VPN PCoIP Confusion Cleared Up