VMware View 5.1 SSL Certificates

With the release of VMware View 5.1, the use of SSL certificates on your connections servers has become a requirement. There are ways of avoiding the use of SSL certificates for the View connections servers, however in the nature of security this isn’t recommended. In View 5.1 the process of changing the SSL certificate on your connection servers is much simpler than in previous releases as i will demonstrate in this article.

Assuming you have generated or purchased a trusted certificate with the relevant common name, and friendly name of “vdm”. Open an MMC console on your connection server and add the Certificates add-on then select to open Local Computer. Navigate to the Personal folder then the Certificates folder where you will find the default self assigned View connection server certificate. This is the one we want to replace so right click the certificate and select delete. Once this has been deleted, highlight the Personal folder, right click, select All Tasks, then click Import. Import your trusted certificate and should see it appear under the Personal/Certificates folder.

Providing you have generated your certificate correctly with a friendly name of vdm (this is most important), open the Windows Services console and restart the VMware View Connection Server service. This will assign the new certificate to the connection server. Once the service is back up and running, try browsing to the admin page of the connection server by the common name of the certificate to verify the certificate has changed, for example view.contoso.local/admin. If your running Internet Explorer you shouldn’t receive the a certificate warning with the red bar at the top of the page.

Once you have confirmed the new SSL certificate is being used by the connection server, log in to the View administrator console and navigate to the Server options under the View Configuration tab. Locate your connection server and click edit, in the connection server properties under the General tab you will see HTTP(S) Secure Tunnel, make sure you set the External URL to the common name of the new certificate. In this case view.contoso.local.

If all has been configured correctly and your certificate is trusted, on the View administrator dashboard you should see the service status of the connections servers as green.

vSphere 5 Standard vSwitch Multi NIC vMotion Setup

vSphere 5 offers the new feature of Multi NIC vMotion allowing you to push vMotion traffic simultaneously down more than a single NIC. In previous releases of vSphere, only a single NIC would ever be used even if multiple NICs were part of a network teaming policy.

To configure Multi NIC vMotion, simply follow the below steps:

Step 1. Under the Configuration tab of a host, click Networking then select Add Networking. Select the option VMKernel and click next, select the network adapters you want to use for vMotion and click next.

Step 2. When presented with the below screen, enter a network label for this first VMKernel port, for example “vMotion-1″ and check the box “use this port group for vMotion” and click next.

Step 3. On the next screen enter the IP address and subnet mask for this first VMKernal port and click next, then click finish. This will now create the vSwitch with the first port group and assign the two chosen virtual adapters to the switch.

Step 4. When the vSwitch has finished building, click the Properties button for the switch and you will be presented with the below screen. Click the Add button and go through creating a second VMKernel port for vMotion as you did in the previous steps.

Step 5. Once you have created your second VMKernel port, go back to the vSwitch properties windows, select the first vMotion VMKernel port and click edit.

Step 6. Click the NIC Teaming tab, then under Failover Order, check the box “Override switch failover order”. The NIC teaming options will now become available as shown below.

Step 7. In the NIC teaming policy editor, ensure only one NIC is moved under Active Adapters and any others placed under Standby Adapters. Once completed, click OK and the changes will apply. This will force this VMKernel port to only use a singular NIC in the networking team.

Step 8. Follow steps 5 to 7 for the second VMKernel port and remember to invert the NIC teaming policy from what you set for the first VMKernel port. For example, if vMotion-1 has vmnic1 as active and vmnic2 as standby, vMotion-2 should have vmnic2 as active and vmnic1 as standby.

The configuration of Multi NIC vMotion is now complete and you should experience much fast vMotion operations. To confirm your setup is working correctly, examine the performance statistics for the virtual adapters you chose during the setup, and issue a vMotion operation. You should see simultaneous active across all NICs.

Set Datastore Multipathing Policy Automaticly with PowerCLI

You may find when you add a new host to your vSphere environment and discover any datastores presented to the host, the multipathing policy will be automatically set to MRU (Most Recently Used). For best performance it’s recommended to change this policy to Roundrobin, however this is a very manual and tedious task of adjusting each datastore on each host.

To speed this process up, below you can find a PowerCLI command that will set all datastores on a specific host to Roundrobin.

Get-Cluster “clustername” | Get-VMHost -Name “hostname” | Get-ScsiLun -LunType “Disk” | Set-ScsiLun -MultipathPolicy “roundrobin”

Equally you can use the same command for setting your datastores to MRU as shown below.

Get-Cluster “clustername” | Get-VMHost -Name “hostname” | Get-ScsiLun -LunType “Disk” | Set-ScsiLun -MultipathPolicy “MostRecentlyUsed”

VMware View 5.1 Storage Accelerator

With the release of VMware View 5.1 a number of new features have been introduced, particularly around storage performance. For me, the key feature is the View Storage Accelerator, or you may hear it referred to as Host Caching.

Without going into intricate detail, the storage accelerator basically creates an additional file within the datastores for the replica disk and all linked clone OS disk. This file is know as a digest file and is used as a caching mechanism. The way this digest file increases performance is by minimising the amount of read requests back to the replica disk. This is done by caching commonly read blocks from the replica disk into the OS disk digest file which can be read directly acting as a cache. This can help minimise boot and log on storms within your View environment.

Enabling the Storage Accelerator is relatively simple and can be achieved by following the below steps.

Step 1. Log in to you VMware View administrator console, under View Configuration click servers. Locate your vCenter server and click Edit.

Step 2. Click on the Host Caching tab then check the Enable host caching for view check box. This will enable the caching capability and allow you to specify the size of the cache for all, or individual hosts. The minimum cache size is 100MB with a maximum of 2GB. Click OK to apply the change.

Step 3. Locate a linked clone pool you want to enable the storage accelerator on and Edit the settings. Click on the far right tab named Advanced Storage and check the Use host caching check box. Click OK to apply the settings.

The storage accelerator features is now enabled for this linked clone pool, and will require a recompose to generate the necessary digest files. Hopefully you will now see a performance increase on read intensive operations.

Thanks for reading.

Copy and Paste Through A Virtual Machine Console

This post will detail how to enable the copy and paste function through a VMware virtual machine console.

Step 1. Power down the virtual machine you want to enable copy and paste for.

Step 2. Edit the virtual machine settings and navigate to the Options tab, then click General under Advanced. On the bottom right of the options screen, click Configuration Parameters.

Step 3. In the Configure Parameters option window, click Add Row to create a new configuration entry.

Step 4. Create two entries with the following Names and Values:

isolation.tools.copy.disable    false

isolation.tools.paste.disable   false

Note, this feature only allows you to copy and past text from your clipboard. This unfortunately does not allow you to copy files through the virtual machine console. If this is what you are trying to achieve, I would recommend using a similar method I use of creating an ISO of your files using CDBurnerXP (very easy to use) and attach the ISO to your virtual machine.

Thanks for reading.

How To Install VMware Tools Without Rebooting

This post will detail how to upgrade VMware tools on virtual machines without having to reboot by using PowerCLI. Personally I have found this quite useful when having to upgrade VMware tools on production servers that require 24×7 up time. I have tried this update method on Windows Server 2008/R2 and RHEL 5/6 with success.

First you need to connect to your vCenter server via PowerCLI and choose one of the two methods of deployment detail below.

Upgrade VMware tools on a singular virtual machine:

Get-VM “yourvm” | Update-Tools –NoReboot

Upgrade VMware tools on all virtual machines:

Get-VM | Update-Tools –NoReboot

Thanks for reading and remember to lookout for my other posts on PowerCLI.

How To Export PowerCLI vCenter Reports

This is a quick post on how to generate some reports from vCenter through PowerCLI.

Log in to your vCenter server via PowerCLI and run a report of your choice:

Virtual Machine Report:

Get-VM | Export-Csv -Path “c:\vmreport.csv”

Snapshot Report:

Get-VM | Get-Snapshot | Export-Csv -Path “c:\snapshotreport.csv”

Datastore Report:

Get-Datastore | Export-Csv -Path “c:\datastorereport.csv”

Host Report:

Get-VMHost | Export-Csv -Path “c:\hostreport.csv”

Cluster Report:

Get-Cluster | Export-Csv -Path “c:\clusterreport.csv”

Thanks for reading.

Connect All Virtual Machine Network Adapters With PowerCLI

In this post I will explain how to run a PowerCLI command to connect or disconnect all virtual machine network adapters. Recently I experienced a power failure in one of my data centres that took out one of my SANs as well a host that held my vCenter server. When the kit was powered back on and vCentre was responding, an odd occurrence took place where all virtual machines managed by this vCenter server had the “Connect On Power On” check box enabled but the “Connected” check box wasn’t. At the time the only way to rectify this issue was to manually go though each virtual machine and check the box for the adapter to be connected. Not a fun experience.

To avoid the requirement for manual intervention to solve this issue for each virtual machine in the future, I have put together a PowerCLI command that will run though all virtual machines and connected their respective network adapters.

To do so, first load PowerCLI and connect to your vCenter server with the following command:

Connect-VIServer -Server vcenter.domain.local  -User domain/username -Password yourpassword

Following this, run the below command. This will run through all virtual machines managed by vCentre and connect network adapters 1 and 2. You can add additional adapters to be connected by simply adding more into the command e.g. “Network adapter 3″,”Network adapter 4″ etc.

Get-VM | Get-NetworkAdapter -Name “Network adapter 1″,”Network adapter 2″ | Set-NetworkAdapter -Connected:$true -Confirm:$false

I hope you found this post useful, and remember to look out for my future posts on PowerCLI.

How To ThinApp Microsoft Office 2010

This video guide will demonstrate how to ThinApp Microsoft Office 2010 by following the steps detailed within a guide posted by b4z.co.uk


What I’m Using:

- VMware Workstation 8

- Base Windows XP Pro VM

- Base Windows 7 Pro VM

- VMware ThinApp v4.7

- Microsoft Office 2010 Standard with MAK key

Key Points To Follow:

- You must create the ThinApp on a Windows XP machine

- You must disconnect your network connection to the Internet before you install Microsoft Office

If you follow this guide exactly you will succeed in creating a working ThinApp of Microsoft Office 2010 that can be activated.

Rebuild Your ThinApps with ReLink

In this post we will be a addressing the issue of receiving the error message ‘your runtime license has expired’ as shown below.

This message occurs when the license used to create the ThinApp has expired most commonly found with trial licensing. I had this very problem after creating a number of ThinApps for a proof of concept when they unexpectedly returned the above message. Thankfully VMware have included the ReLink application to deal with such issues allowing you to rebuild your ThinApps under a valid license.

To relink your ThinApps with a working license key, follow the simple steps below:

Step1. Copy all of the application files for your ThinApp to a computer that has a a valid ThinApp license running the ThinApp application.

Step 2. Open a Command Prompt windows by typing ‘cmd’ into the Run  box and navigate to the ThinApp application folder:

cd C:\Program Files (x86)\VMware\VMware ThinApp

Following this, type ‘relink.exe followed by the path and full name of your ThinApp.

Example: relink.exe “C:\Users\User\Desktop\PINs 4\PINs 4.exe”

Step 3. Press enter to execute the command and wait for the ThinApp to be built. If you have a separate .dat file as part of your ThinApp, also run the same command for this. If you have an MSI package, this will not need rebuilding with relink.

A successful output should look as follows:

Step 4. Within your ThinApp folder, delete and files with the extension .bak as these are the original builds of the application and are no longer required.

Thanks for reading and look out for my other ThinApp posts.