Archive for March, 2015

vCloud Director Database Migration

March 20th, 2015

This week I’ve been working on getting some lab infrastructure fitted with much needed updates. One of those components was an aging Microsoft SQL Server 2008 R2 server on Windows Server 2008 R2 which I had been using to host databases for various projects.  Since I had chosen to build the new SQL server in parallel, I’m benefiting with fresh and problem free builds of Microsoft SQL Server 2012 on Windows Server 2012 R2.  The downside is that I’m responsible for dealing with all of the SQL databases and logins and potentially scheduled jobs that must be migrated to the new SQL server.

vCloud Director is one of the last databases left to migrate and fortunately VMware has a KB article published which covers the step required to migrate a back end SQL database for vCloud Director.  The VMware KB article is 2092706 Migrating the VMware vCloud Director SQL database to another server.

Looking at the steps, the migration looks like it will be fairly simple.  VMware even provides the SQL queries to automate many of the tasks.  I’ll migrate my vCloud Director database using these steps in the following video.  I did run into a few issues which mostly boil down to copy/paste problems with the SQL queries as published in the KB article but I’ve provided the necessary corrections and workarounds in the video.

As shown in the video, I ran into a syntax issue with step four.

The SQL query provided by the KB article was:

USE master;
GO
EXEC sp_attach_db @dbname = N’vCD_DB_Name‘,
c:\Program Files\Microsoft SQL Server\MSSQL\Backup\vCD_DB_Name.mdf
c:\Program Files\Microsoft SQL Server\MSSQL\Backup\vCD_DB_Name.ldf
GO

The corrected SQL query syntax according to the Microsoft SQL Server Management Stuido appears to be:

USE [master]
GO
CREATE DATABASE [vCD_DB_Name] ON 
( FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\vCD_DB_Name.mdf' ),
( FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\vCD_DB_Name.ldf' )
 FOR ATTACH
GO

Another issue I’ll note that wasn’t captured in the video deals with step seven where the vCloud Director cell server is reconfigured to point to the new database.  The first time I ran that step, the process failed because the cell attempted to locate the SQL database in its original location which it actually found. When this occurred, the cell configuration script doesn’t prompt me to point to a new SQL instance.  In order for step seven to work correctly, I had to drop or delete the database on the SQL 2008 R2 server and rerun the vCloud Director configuration script.  What happens then is that the cell doesn’t automatically ‘find’ the old instance and so it correctly prompts for the new back end database details.  VMware’s KB article provides most of the steps required to migrate the database but it does need a step inserted prior to step seven which calls for the deletion of the original database instance.  Step two places the vCloud database in READ_ONLY mode but the vCloud cell configuration was still able to ‘see’ which causes step seven to fail.

Blake Garner (@trodemaster on Twitter) provided a helpful tip which will also work with step seven in lieu of dropping or deleting the database on the original SQL server:

You could also clear DB config from the /opt/vmware/vcloud-director/etc/global.properties and run configure again.

Overall the process was still fairly simple and painless thanks to VMware’s published documentation.

VMware Horizon View Agent 6.1.0 Installation Rollback

March 16th, 2015

With the release of vSphere 6 last week, I decided it was time to update some of the infrastructure in the home lab over the weekend. I got an early start Friday as I had my three remaining wisdom teeth pulled in the AM and took the rest of the day off work.  Now I’m not talking about jumping straight to vSphere 6, not just yet.  I’ve got some constraints that prevent me from going to vSphere 6 at the current time but I expect I’ll be ready within a month or two.  For the time being, the agenda involved migrating some guest operating systems from Windows Server 2008 R2 to Windows Server 2012 R2, migrating MS SQL Server 2008 R2 to MS SQL Server 2012, and updating templates with current VMware Tools, and tackling VMware Horizon View getting Composer and the Connection Server migrated from version 5.3 to 6.1.0 including the pool guests and related tools and agents.

I won’t bore anyone with the details on the OS and SQL migrations, that all went as planned. Rather, this writing focuses on an issue I encountered while upgrading VMware Horizon View Agents in Windows 7 guest virtual machines. For the most part, the upgrades went fine as they always have in the past. However I did run into one annoying Windows 7 guest VM which I could not upgrade from View agent 5.1 to View agent 6.1.0. About two thirds of the way through the 6.1.0 agent upgrade/installation when the installation wizard is installing services, a ‘Rolling back action‘ process would occur and the upgrade/installation failed.

The View agent installation generates two fairly large log files located in C:\Users\\AppData\Local\Temp\.  I narrowed down the point in time the problem was occurring in the smaller of the two log files.

svm: 03/16/15 10:54:52 — CA exec: VMEditServiceDependencies
svm: 03/16/15 10:54:52 Getting Property CustomActionData = +;vmware-viewcomposer-ga;BFE;Tcpip;Netlogon
svm: 03/16/15 10:54:52 INFO: about to copy final string
svm: 03/16/15 10:54:52 INFO: *copyIter = RpcSs
svm: 03/16/15 10:54:52 INFO: newDependencyString = RpcSs
svm: 03/16/15 10:54:52 INFO: *copyIter = vmware-viewcomposer-ga
svm: 03/16/15 10:54:52 INFO: newDependencyString = RpcSs vmware-viewcomposer-ga
svm: 03/16/15 10:54:52 ERROR: ChangeServiceConfig failed with error: 5
svm: 03/16/15 10:54:52 End Logging
svm: 03/16/15 10:54:53 Begin Logging
svm: 03/16/15 10:54:53 — CA exec: VMEditServiceDependencies
svm: 03/16/15 10:54:53 Getting Property CustomActionData = -;vmware-viewcomposer-ga;BFE;Tcpip;Netlogon
svm: 03/16/15 10:54:53 Cannot query key value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\DependOnService for size: 2
svm: 03/16/15 10:54:53 Cannot query key value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\DependOnService for size: 2
svm: 03/16/15 10:54:53 End Logging

In addition, the Windows event log reflected Event ID: 7006 “The ScRegSetValueExW call failed for DependOnService with the following error: Access is denied.

I had made a few different attempts to install the 6.1.0 agent, each time trying a different approach. Checked registry permissions and dependencies, relaxed registry permissions, enabled auditing, temporarily disabled Avast Antivirus, etc.  The VMware Horizon View Agent installs a handful of components. Although I didn’t know yet what the issue was on the OS, I had the problem narrowed down to the VMware Horizon View Composer Agent portion of the installation which installs VMware Horizon View Composer Guest Agent Server service (vmware-viewcomposer-ga is the name of the service if you’re looking in the registry).

After doing some more digging, I found out that some antivirus applications like Panda have a a self-preservation mechanism built in which can cause unexpected application problems. Avast has one as well and it’s called the avast! self-defense module. This defense mechanism works independently of normal real time antivirus scans which I had disabled previously.  I had never run into a problem with Avast in the past but in this particular instance, Avast was blocking the modification of Windows services and dependencies. The easy solution, and I wish I had known this from the start but I don’t invest much time in antivirus or malware unless I absolutely have to, was to disable the avast! self-defense module which can be found in the Troubleshooting area of the Avast settings.

Once the avast! self-defense module was disabled, the installation of the VMware Horizon View Agent 6.1.0 agent, including the VMware Horizon View Composer Agent portion, completed successfully. After the agent installation completed, a reboot was performed and I re-enabled the avast! self-defense module.

Thus far I’m impressed with VMware Horizon 6.1. Not much has changed from UI/management perspective but stability and cleanup within Composer operations has improved. I built up and tore down a 28 Windows 7 guest VDI pool and whereas this has lead to precarious pool states and manual cleanup steps in the past, it has worked flawlessly so far.  I’m definitely looking forward to the jump to vSphere 6 infrastructure in the coming weeks. All but one of the other lab infrastructure components have been upgraded and are ready at this point so it shouldn’t be much longer until I have vSphere 5.x in my rear view mirror.

VMware vRealize Operations Manager 6.0.1 & Dell Storage Speed Run

March 11th, 2015

For the most part – 12:38 was my time.

There are a few spots where I could improve but what you see here is what you get – a quick video I threw together outlining a simple VMware vRealize Operations Manager 6.0.1 appliance deployment, including:

  • vCenter adapter configuration
  • Active Directory role integration
  • Dell Storage Solutions Pack installation and configuration
  • Dashboard sharing

Obviously I trimmed some of the “wait” intervals but the goal here was to cover the quick and easy steps to get vR Ops 6.x up and running from ovf download to collecting in a very short amount of time.

In case you are unaware, VMware vRealize Operations Manager 6.0.1 was released a little under two weeks ago and it includes some improvements over the December 6.0.0 release:

Updates cover all major areas of the product including installation, migration, configuration, licensing, alerting, dashboards, reports, and policies. To take advantage of the following significant enhancements, upgrade to version 6.0.1.

Improved scaling numbers

  • The number of objects that a single large node supports has been increased to 12,000. Also, in multi-node configurations, a four large-node configuration can manage up to 40,000 objects and an eight large-node configuration can manage up to 75,000 objects. For details on scaling numbers and a link to a Sizing Guideline Worksheet, see KB 2093783.

vSphere v6.0 interoperability support

  • With this release, vSphere v6.0 can function both as a platform for vRealize Operations Manager installation, and as an environment to which vRealize Operations Manager can connect for operational assurance.

User interface improvements

  • Corrections in the Views and Reports content for vSphere Hosts and Clusters.
  • Addition of Hierarchical View in the Topology widget.
  • Enhancement to the Geo widget displays objects on a world map.

Licensing improvements

  • New functionality provides a way to use the REST API to add a license key.

Metrics switched to Collection OFF to improve performance

  • Extraneous metrics are switched to Collection OFF in the default Policy. An option to enable Collection is available. However, maintaining metrics in the OFF state saves disk space, improves CPU performance, and has no negative impact on the vRealize Operations Manager functionality to collect and analyze data. For a list of metrics with Collection switched to OFF, see KB 2109869.

Alert Definition Updates

  • Improved alert definitions for vSphere clusters, hosts, and virtual machines, to better detect CPU and memory problems.
  • Improved alert definitions for hosts and virtual machines in the vSphere 5.5 Hardening Guide, to identify and report more non-compliance issues.
  • Additional alert definitions to detect duplicate object names in vCenter and vSphere Storage Management Service errors. Note: To identify duplicate object names in the vCenter Server system, the name-based identification feature must be enabled for the vSphere adapter.

I spent a fair amount of time with vC Ops 5.x and I’ll be the first in line to say vR Ops 6.x has a much more polished look and feel which generally makes consumption of this datacenter management tool much more of a pleasure to work with in terms of installation, configuration, and daily use. But don’t take my word for it, see for yourself: