vCenter 5.5 Update Manager Install with SQL Mirroring

When I first started at my current job we were a company with a few standalone SQL Servers. There were development and production instances on both SQL 2005 and 2008. This isn’t a problem, but we lacked any kind of High Availability for these databases. One of the first projects I took on was creating a SQL 2012 Failover Cluster. The setup was relatively painless and it provided us the ability to patch SQL hosts without having to take down any of the applications that depending on it. The drawback was every time I did a cluster failover vCenter Update Manager would stop working and the service needed to be restarted. A minor annoyance, but something that always bothered me.

To alleviate this (and with available SQL licenses), I implemented a new SQL 2012 Mirrored instance and while I was building our brand new ESXi 5.5 environment it was the perfect time to move the vCenter Update Manager database to SQL mirroring. While I don’t have a blog post about how to setup SQL Mirroring (but I do have the process documented), this shows the process of provisioning the databases on the Principle and the Mirror and the commands to mirror the database with automatic failover (with a Witness server). In the future I hope to blog about the setup of SQL Mirroring.

 

Prerequisites:

  1. Have vCenter 5.5 already installed and running
  2. Download the ISO for vCenter 5.5 from VMware which will need to be mounted on the server that will host vCenter Update Manager (VUM).
  3. Have an additional Disk drive added to the destination server hosting Update manager because I prefer leaving the OS drive for the OS and all programs are installed on the secondary data disk.
  4. 3 Servers with SQL installed and configured for mirroring (Principle, Mirror, Witness).
  5. Install the 64-bit SQL 10 Native Client from the SQL 2008 install .ISO (sqlncli.msi) on the server hosting VUM.
  6. A domain user account to run the VUM service and connect to SQL (domain\vupdatemanager for this writing)

 

SQL Mirroring Configuration:

  1. Connect to the principle SQL server (SQLMir-01 for this writing)
  2. Expand Security and Logins. Right click “Logins” and click “New Login”
    DB051314-step2
  3. Enter the login name for the Update Manager Active Directory account, choose “Windows Authentication”
    1. Change the “Default database” to “msdb” and click “OK”
      DB051314-step3a
    2. Click on “User Mapping” and place a check next to “msdb” then under “Database role membership” place a check next to “db_owner”
      DB051314-step3b
  4. Right click on “Databases” and choose “New Database”
    DB051314-step4

    1. Enter the database name
      DB051314-step4a

      1. Click the “…” button next to “Owner” and browse for the login we just created, place a check mark for it and click “OK” and “OK”
        DB051314-step4ai
    2. Click the “Options” link on the left side and ensure that Recovery Model is set to “Full” and Compatibility level is set to “SQL Server 2012 (110)” then click “OK”
      DB051314-step4b
  5. Right click on the newly created database and go to “Tasks” followed by “Back Up”
    DB051314-step5

    1. Name the backup file and note the location of the backup file and click “OK”
      DB051314-step5a
    2. Navigate to that Location and copy the backup
      DB051314-step5b
    3. Paste this file on to the Mirror Server
      DB051314-step5c
  6. Connect to the Mirror SQL Server (SQLMir-02 for this writing) and create the Update Manager account just like in Step 3 on that server as well (Do not create the database)
  7. Right click on “Databases” and choose “Restore Database”
    DB051314-step7

    1. Click “Device” for the source, then click the “…” button, click the “Add” button and it locate the .BAK file. Click on it and click “OK”, then “OK” again.
      DB051314-step7a
    2. Click the “Options” link on the left side and change “Recovery state” to “RESTORE WITH NORECOVERY” then click “OK”
      DB051314-step7b
  8. On the Mirror SQL server (SQLMir-02), click on “New Query” and run the following command: (This is creating the connection for the Mirror to allow mirroring from the Principle)
    DB051314-step8

    1. ALTER DATABASE vCenterUpdateManager
      SET PARTNER = 'TCP://SQLMIR01-Mirror.domain.com:5022'
  9. Back on the primary SQL server, click on “New Query” and run the following commands:
    1. ALTER DATABASE vCenterUpdateManager
      SET PARTNER = 'TCP://SQLMIR01-Mirror.domain.com:5022'
      GO
      ALTER DATABASE vCenterUpdateManager
      SET WITNESS = 'TCP://SQLWIT01-Mirror.domain.com:5022'

The SQL Servers (Principle, Mirror, Witness) have multiple network connections (Production, Mirror, and Backup). A DNS entry was created for their Mirror network IPs to allow them to communicate over a non-routable network to minimize latency. Mirroring would work if I set the string to “TCP://SQLMir-01.domain.com:5022” if a private network isn’t available.

 

vCenter Update Manager Install/Config:

  1. Login to the server as the user account that will connecting to vCenter/update manager database (domain\vupdatemanager for this writing)
  2. Create a 32bit ODBC connection to the SQL database
    a. Navigate to C:\Windows\SysWOW64 and open “odbcad32.exe”
    VUM051314-step2a
    b. Click the “System DSN” tab then click the “Add” button
    VUM051314-step2b
    c. Scroll to the bottom and choose “SQL Server Native Client 10.0” and click “Finish”
    VUM051314-step2c
    d. Enter the name of the connection and find the SQL Server\Instance and click “Next”
    VUM051314-step2d
    e. Choose “With Integrated Windows authentication” and click “Next”
    f. Change the default database to the Update Manager Database then set the Mirror Server as the SQL Server Name\Instance. Click “Next”
    VUM051314-step2f
    g. Click “Finish” then click “Test Data Source”. If test is successful, click “OK” then “OK” again and again
    VUM051314-step2g
  3. After the ISO has been mounted on the virtual machine, open “Computer” and open the CD
  4. If the installer doesn’t automatically open, locate the “autorun” application and double-click it.
  5. At the installer screen, choose “vSphere Update Manager” under the “VMware vCenter Support Tools” section. Then click “Install”
    VUM051314-step5
    a. Choose the appropriate language and click “OK”
    b. Click “Next” to begin the install process
    c. Accept the license agreement and click “Next”
    d. Leave the box for “Download updates from default sources” checked and click “Next”
    VUM051314-step5d
    e. Enter the FQDN or IP of the vCenter server to be connected to as well as the username/password for the account you’re currently logged in as (I’ve made this account an Administrator in vCenter at the Datacenter level)
    VUM051314-step5ei
    f. Choose “Use an existing supported database” and then choose the DSN connection created in step 2 and click “Next”
    VUM051314-step5f
    g. Click “Next” to confirm the database information and click “OK” to ignore the warning about Full recovery
    h. Choose the IP address and note the ports being used then click “Next”
    VUM051314-step5h
    i. Change the Install directory from C: to D: and then click “Next”
    VUM051314-step5i
    j. Click “Install”
    k. Click “Finish”
  6. After installation completes, press the Start button, Administrative Tools, then Services
    VUM051314-step6
    a. Locate the “VMware vSphere Update Manager Service”, right click and choose “Properties”
    VUM051314-step6a
    b. Click the “Log On” tab and click the “This account” button then enter the login information for the domain account used for update manager then click “Apply”
    VUM051314-step6b
    c. Click “OK” for the dialog box about granting log on as a service rights
    d. After the new service account has been applied, click the “General” tab then click the “Stop” button. Once the service has stopped, hit the “Start” button. Then click “OK”
  7. Open up the vSphere client (not the web interface) and login to the vCenter server
    a. Click the “Home” button
    VUM051314-step7a
    b. Click the “Update Manager” button under “Solutions and Applications”
    VUM051314-step7b
    c. Click on the “Baselines and Groups” tab
    VUM051314-step7c
    d. Click the “Create” link towards the top right corner under “Compliance View”
    VUM051314-step7d
    e. Select “Host Baseline Group” and give it a name (“All Patches” for this example). Click “Next”
    VUM051314-step7e
    f. Click “Next” through “Upgrades” page
    g. Select both Critical and Non-critical patches and click “Next”
    VUM051314-step7g
    h. Click “Next” through the “Extensions” page
    i. Review the settings and click “Finish”
    VUM051314-step7i
  8. Click the “Home” button again then choose “Hosts and Clusters”
    VUM051314-step8
    a. (For this writing, we’ll attach the baseline group to the Datacenter, but I usually apply this at the cluster level)
    b. Click on the Datacenter then click on the “Update Manager” tab
    VUM051314-step8b
    c. Click the “Attach” link towards the top right corner
    VUM051314-step8c
    d. Under “Baseline Groups” choose the name of the Baseline group created and click “Attach”
    VUM051314-step8d
    e. Once attached, all the Hosts will display under “All Groups and Independent Baselines”. Click the “scan” button towards the top right corner
    VUM051314-step8e
    f. Click the “Scan” button on the pop up box
    VUM051314-step8f
    g. Once scanning is completed, click the “Stage” button towards the bottom right corner
    VUM051314-step8g
    h. Ensure both Critical and Non-critical patches are selected as well as the host and click “Next”
    VUM051314-step8h
    i. Click “Next” after reviewing the patches to be applied
    VUM051314-step8i
    j. Then click “Finish” (All patches that can be staged will be placed on the host, some that can’t be staged will be loaded once you choose “Remediate”)
    k. Once staged, click the “Remediate” button towards the bottom right corner
    l. Click the baseline group created earlier then click “Next”
    VUM051314-step8l
    m. Review the patches and click “Next”
    VUM051314-step8m
    n. Choose “Immediately” for the remediation time and click “Next”
    VUM051314-step8n
    o. Choose your VM power state options (In a multi-host cluster choosing “Do Not Change VM Power State” will cause VMs to be vMotioned to another host when entering maintenance mode)
    VUM051314-step8o
    p. Click Finish (This will cause the Host to enter maintenance mode, apply patches, and reboot if necessary)
  9. After the host finishes rebooting we’ll see the new build number
    VUM051314-step9

Applying baselines at the cluster level will help to ensure all your hosts are running the same builds/patches and help prevent version mismatch issues. I prefer to created one baseline for all my hosts that includes any required extensions. In my environment we run NetApp storage which requires a host component to take advantage of VAAI. By adding this into my required patching I make sure all my hosts are able to take advantage of this.

Advertisements
vCenter 5.5 Update Manager Install with SQL Mirroring

2 thoughts on “vCenter 5.5 Update Manager Install with SQL Mirroring

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s