Technologist

Tech stuff about Cloud, DevOps, SysAdmin, Virtualization, SAN, Hardware, Scripting, Automation and Development

Browsing Posts in VMware

VMware Update Manager is a tool automate and streamline the process of applying updates, patches or upgrades to a new version. VUM is fully integrated within vCenter Server and offers the ability to scan and remediate ESX/ESXi hosts, virtual appliances, virtual machine templates, and online and offline virtual machines running certain versions of Windows, Linux, and some Windows applications.

In this post you will learn how to install VMware Update Manager.

  1. Create and configure Database
  2. Create an (ODBC) DSN for the Database
  3. Install VMware Update Manager
  4. Install the VUM plug-in for the vSphere Client

1. Create and configure Database

To create the database I use the free SQL Server Manager Studio Express.

You can find it at:

http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

Open SQL Server Manager Studio Express, Right Click on Database and click on New Database…, enter the name of the database and the owner. (For the owner, you can use a Windows account or a SQL account), then Click Ok and you should see the new Database

2) Create an (ODBC) DSN for the Database

Go to Start menu->Administrative Tools->Data Sources (ODBC)

Select the System DSN tab and click on Add…, select SQL Native

Give it a name, description and select the server that hosts the database, in this case is localhost

Select the authentication that matches the owner of the Database, in this case I used SQL Authentication. Click Next

Make sure you select to Change the default database to the previously create database(VUM), Click Next…

Leave defaults, unless you have a need to change any of these settings

Click Finish and OK.

3) Install VMware Update Manager

From the Iso/ZIP vCenter Installation package select to install vCenter Update Manager and follow the wizard

Select your vCenter, Username and Password.

Select the Existing Database you created previously, click Next…

Enter the username/password for the database user

Select the port settings, you can leave defaults unless there is a need not to do so

Select where to install VUM and where to download the patches/updates

Make sure you have enough disk space and then click Install, then Finish.

4) Install the VUM plug-in for the vSphere Client

In order to be able to use VMware vCenter Update Manager, you need to install a plug-in into the vSphere client.

Open the vSphere Client and got to Plug-ins-> Manage Plug-ins…

You will see the VMware vCenter Update Manager plug-in available, click on Download and Install

Follow the simple wizard and you will have it now installed!

You have ESX 3.5 hosts and you want to upgrade your virtual center to the new vCenter 4.

vCenter 4 offers a lot more than regular virtual center 2.5. vCenter 4 was built to manage vSphere hosts, but you can also manage ESX3.5.

vCenter 4 does NOT have a license server which is needed by ESX 3.5 hosts. You need to get the license server from the virtual center 2.5 installation Iso/ZIP package.

1) On the package you will find VMware-licenseserver.exe, Double click it to begin installation wizard:

2) . Accept the Agreement and select where to install the License server, leave defaults.

3) Enter the location of your VMware License file

4) Click Next and Finish.

5) Open up your vSphere Client and go to Administration->vCenter Server Settings->Licensing and enter the hostname/IP of the License Server which in this case is the same as the vCenter Server 4.

6) thats it, now you can add your ESX3.5 hosts and use whatever features you license file allows.

This is the guide for installing a production ready vCenter Server 4.

vCenter Server is an application that runs on top of Windows to manage your ESX servers and provides extra functionality to your ESX farm, such as clustering, HA, DRS, Failover, and much more.

VMware recommends 64bit version of Windows.

For this guide I will use:

Virtual Machine with 2 vCPU and 8GB RAM and 50GB HDD

Windows 2003 Standard Edition 64-Bit

SQL Server 2005 Standard 32-bit(I don’t have 64bit edition)

  1. Install Windows 2003 Standard 64 bit
  2. Prepare to install SQL server 2005
  3. Install SQL Server 2005 32bit
  4. Install SQL Server Management Studio Express(Optional)
  5. Create vCenter Database
  6. Create vCenter Schema
  7. Change Database Recovery Mode
  8. Create ODBC connection (32 bit)
  9. Install vCenter Server 4


1) Install Windows 2003 Standard Edition 64-Bit

Update it using windows update and make sure it has .NET 3.5, this should be straight forward, nothing related to vCenter at this point.


2) Prepare to install SQL Server 2005

Remove MSXML Core Services 6.0

“If Microsoft SQL Server 2005 is not already installed and the machine has MSXML Core Services 6.0 installed, remove MSXML Core Services 6.0 before installing Microsoft SQL Server 2005. If you cannot remove it using the Add or Remove Programs utility, use the Windows Installer CleanUp utility.” –http://support.microsoft.com/kb/968749

I am using the Windows Installer CleanUp utility to remove it. The utility can be found at http://support.microsoft.com/kb/290301

Install the Windows Installer CleanUp utility:

Go to All Programs and Run the Windows CleanUp utility:

Once it has been removed we can proceed with the installation of SQL Server 2005


3) Install SQL Server 2005 Standard 32-bit

a. Fire up the installation and click on Install Server and accept the End User Agreement

b. Click on install

c. Click next on the Wizard

d. You should see success and a couple of warnings that can be ignored since you don’t need IIS. SQL can use IIS for reporting, but you don’t need it for vCenter

e. Continue with the wizard and enter your license key and name information and click next

f. The only thing you need is “SQL Server Database Services”

g. Select the default instance unless you have already installed another instance of SQL Server

h. Select Service account, I am selecting the built-in system account, but if you want you can use a domain service account. Also ensure that SQL server is checked, that way it will start the service.

i. Select Mixed Mode to allow both Windows and SQL authentication

j. Leave default Coallition Settings

k. Select if you want to help microsoft by sending reports, then click next

l. You are done, click Install

m. You should see this screen, then click next

n. At the end you get a summary and you can also use the “Surface Area Configuration Tool” to select how to login to the SQL Server from remote locations

o. Now update SQL to the latest VMware supported SQL Server Service Pack, I updated to SP3.

p. vCenter will give you a warning about remote connections, and they suggest using both TCP/IP and named pipes. Open the SQL Server Surface Area Configuration found in All Programs->Microsoft SQL Server-> Configuration Tools

Click on Surface Area Configuration for Services and Connections

p. Click on Remote Connections and select: Using both TCP/IP and named pipes

Once you click OK, you will need to restart your database

q. You will also need to start and automate the start up of SQL Server Agent(MSSQLSERVER), under All Programs->Microsoft SQL Server-> Configuration Tools->SQL Server Configuration Manager

Right Click and Start the service, then go to properties->service and select to Start Mode Automatic




4) Install SQL Server Management Studio Express(Optional, it’s Free!)

I use it to run SQL scripts to automatically create the vCenter Database and Schema

I installed the 64bit version, located at:

http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en


5) Create vCenter Database

VMware provides a SQL script where you need to change the location of the Database files and the password (the items in red):

=========================

use [master]

go

CREATE DATABASE [VCDB] ON PRIMARY

(NAME = N’vcdb’, FILENAME = N’C:\VCDB.mdf‘ , SIZE = 2000KB , FILEGROWTH = 10% )

LOG ON

(NAME = N’vcdb_log’, FILENAME = N’C:\VCDB.ldf‘ , SIZE = 1000KB , FILEGROWTH = 10%)

COLLATE SQL_Latin1_General_CP1_CI_AS

go

use VCDB

go

sp_addlogin @loginame=[vpxuser], @passwd=N’XXXXXXXXXX‘, @defdb=’VCDB’, @deflanguage=’us_english’

go

ALTER LOGIN [vpxuser] WITH CHECK_POLICY = OFF

go

CREATE USER [vpxuser] for LOGIN [vpxuser]

go

sp_addrolemember @rolename = ‘db_owner’, @membername = ‘vpxuser’

go

use MSDB

go

CREATE USER [vpxuser] for LOGIN [vpxuser]

go

sp_addrolemember @rolename = ‘db_owner’, @membername = ‘vpxuser’

go

=============


6) Use vCenter dbschema scripts provided by VMware in the iso/zip file to create the necessary Tables

Locate the dbschema scripts in the vCenter Server installation package VMware-VIMSetup-all-4.xxx\vpx\dbschema directory.

Run the scripts in the following sequence on the database:

  1. VCDB_mssql.SQL
  2. purge_stat1_proc_mssql.sql
  3. purge_stat2_proc_mssql.sql
  4. purge_stat3_proc_mssql.sql
  5. purge_usage_stats_proc_mssql.sql
  6. stats_rollup1_proc_mssql.sql
  7. stats_rollup2_proc_mssql.sql
  8. stats_rollup3_proc_mssql.sql
  9. cleanup_events_mssql.sql
  10. delete_stats_proc_mssql.sql
  11. upsert_last_event_proc_mssql.sql
  12. job_schedule1_mssql.sql
  13. job_schedule2_mssql.sql
  14. job_schedule3_mssql.sql
  15. job_cleanup_events_mssql.sql


7) Change Recovery Mode from Full to Simple to reduce Database size footprint (Optional)

This prevents the database to fill up too quickly. vCenter suggests to have it on Simple Recovery Mode unless you really need to have it in Full Mode for whatever reason. Open SQL Server Management Studio Express and change the Properties of the VCDB database:


8 ) Create ODBC Connection ( 32-bit )

“Even though vCenter Server is supported on 64-bit operating systems, the vCenter Server system must have a 32-bit DSN.
This requirement applies to all supported databases. By default, any DSN created on a 64-bit system is 64 bit.” –vmware

Run the 32-bit ODBC Administrator application, located at:

C:\WINDOWS\SysWOW64\odbcad32.exe
a. Go to the System DSN tab and add a new SQL Native Client data source:
b. Name it whatever you want and point it to the SQL Server(in this case local)
c. Authenticate using SQL using the user created previously
d. Make sure the default database is VCDB
e. Leave all the rest as is and test the connection and then if successful click OK and OK again.


9 ) Install vCenter Server 4

Now that the Database has been provisioned, you can proceed with the installation of vCenter Server.
a.Use your ISO/ZIP file and run it to start the vCenter Server installation wizard
Select vCenter Server

b. Follow the Wizard
c. Enter your license information
d. Use the existing database you have created previously and the DSN (ODBC) you created
e. Select the SQL user and password you used in the SQL script
f. Select the user that will be used for the services to run under. I am using the local SYSTEM account, but if your organization uses a Domain Service account then use that
g. Select the location where to install vCenter Server
h. Create a standalone vCenter server. If you want Linked mode, then install more vCenter Servers and select Linked Mode on them.
i. Leave the default ports, unless you have a need to set them differently
j. Click Next and go drink some coffee/tea/beer and come back and click Finish
That’s it, you have installed a vCenter Server running on Windows 2003 Standard 64bit with SQL Server 2005 32-bit.
I recommend to install the vSphere client on the server to test locally. But it is not necessary, you can install it on your workstation and manage it from there.

Problem:

I moved a virtual machine from one datacenter to a remote datacenter using SCP. I shut it down and from the ESX host I SCP’ed over to the new site. Then I fixed its network and since I had much more resources in the new datacenter, I gave it the virtual machine more RAM. When I powered on the virtual machine it was very slow and it is impossible to work with it, since it is very slow. Also I am getting warnings about “fault.MemorySizeNotRecommended.summary

Solution:

When you migrated the virtual machine and import it to the new datacenter, the amount of RAM the virtual machine had was set as the “sched.mem.max“, thus limiting the amount of RAM. If you plan to increase the amount of RAM you want for a virtual machine to have after migration then adjust the setting either from the .vmx configuration file or from the GUI as follows:

From the .vmx confuguration file:

sched.cpu.min = “0”
sched.cpu.max = “72320”
sched.cpu.units = “mhz”
sched.cpu.shares = “normal”
sched.mem.minsize = “0”
// sched.mem.max = “1024” //change to amount of RAM you want.

sched.mem.max = “4096”
sched.mem.shares = “normal”

From the GUI:

Set the limit to what you want

Change RAM limit after migration