Upgrading and Migrating Virtual Center 4.0 to vCenter 5.0 to a x64Bit platform

I have been planning to put together an article on Upgrading and Moving Virtual Center 4.0 to vCenter 5.0 since a long time and here it goes today.

What we have in Lab?
I have prepared 2 ESX named as ESX4-A and ESX4-B. (we will be upgrading this to ESXi 5 in next article)
Also, I have setup a MS-SQL 2005 Enterprise server on Windows 2003 R2 Enterprise SP2 x86 which  is serving as a separate database server for Virtual Center server. This server is named as SQL2005
A Virtual Center 4.0 server on Windows 2003 R2 Enterprise SP2 x86, named as vcenter4
XP Pro workstation from where virtual center will be managed using vSphere Client.

A SQL2008R2 x64 server on Windows 2008 R2 x64 OS, which will serve as Database server for vCenter 5
A Windows 2008 R2 x64 Server which will host our new vCenter Server 5.0

From XP Client I have connected to Virtual Center server via vSphere Client.
image

On SQL2005 Server, The database is using a SQL User account “VCDBUser” (it is not a local user account)
image
SCRN-CAP-0011
image

On Virtual Center server a 32-Bit ODBC DSN is created to connect to database VC_DB on SQL2005, using VCDBUser account that is created on SQL Server.
image
image
Now, Lets prepare the SQL2008R2 server and install SQL2008 R2 database server. I have also enabled .Net 3.5 feature of windows 2008 R2.
Here is the feature selection page for SQL2008 R2.
SCRN-CAP-0015
Using default instance name.
image
Using system account for all the services that will be installed. (not as per the best practice)
image
Default Collation settings Latin1_General.
image
Used Mixed Mode authentication, as we will be again using SQL user account for database.
image
image
Once the setup is complete, set the memory consumption settings under Server properties / Memory. I set it to use 640MB as I am using only 1GB for this server.
image.

Lets move to vCenter5 server, very 1st we will enable .Net 3.5 feature and Install SQL 2008 R2 Native Client x64 so what we can create a x64 bit DSN to connect to database on SQL2008R2, which is a requirement to connect vCenter to SQL.
image
If you check the ODBC / System DSN and create a new DSN you will not find the Native Client, for that you need to install it.
image
image
image

We will create the ODBC DSN later.
So, we have checked what we have got in hand..

 

Lets Move the Database now!!

At present virtual center database is served by a SQL 2005 server which is on x86 platform. We need to move it on SQL 2008 R2 x64 on x64 platform.

Let us go to SQL2005 server and detach the database.
image
Note: When you try to detach, you will see the Database is still in use. Check the Message column, it says “12 Active Connections”
This means the virtual center server is using the database, hence we need to stop the virtual center services before we move ahead.
image
image
image
Once the database is detached, it will not appear under databases section in left panel.

Now, browse to the location where the database files were located.
The default installation will save the files under C:\program files\Microsoft SQL server\MSSQL.1\MSSQL\Data
From here we need to copy VC_DB.mdf and VC_DB_log.ldf files to SQL 2008 R2 server.
image
On SQL2008R2 server, I copied the files to default location.
image

Open SQL Server Management studio on SQL2008R2 server and Attach the copied database.
image
image
image
As you can see, VC_DB database is attached.
If we check the Users folder we find user “VCDBUser” associated with the database, but it is not available under “Logins” folder.
Delete the User VCDBUser which is associated with database.
I will create the user VCDBUser with same password as I had before.

image
User “VCDBUser” with SQL Authentication and Default database set to VC_DB.
image
image
image
Now, we will create a ODBC DSN on vCenter5 Server.
image
image
Here you can see the Database that is selected by default is showing “VC_DB” coz we have associated the VCDBUser with this database, which is correct.
image
image
We have successfully moved the database from SQL 2005 to SQL2008 R2.


 

Virtual Center Server Configuration Backup

On Virtual Center server (vCenter4) insert vCenter DVD.
Create a directory named “DataMigration” on C Drive.
Browse the DVD and extract the content of datamigration.zip found under D:\datamigration folder.
image
image
Start the Command Prompt with administrator rights and run Backup.bat.
image
If you get the error similar to this, that means the Command Prompt did not start with Full Administrator privilege.
SCRN-CAP-0050
Make sure to Right Click CMD and select Run As… and UNCHECKRun this program with restricted access
SCRN-CAP-0052
Now run Backup.bat again.
image
The backup is created successfully.
image
The Configuration backup is done!.

vCenter Server 5 Installation


Now, Copy DataMigration folder from Virtual Center server to vCenter5 server, put it on C drive.
On vCenter5 Server, run Command Prompt with administrator rights.
Put vCenter 5 DVD.

From CMD go to directory C:\DataMigration and run “Install.bat
image
It will prompt that the name of system is different than the original. type Y to continue.
image
It will prompt to enter the Path for media. Type D:\
image
Installation of vCenter will start.
image
Continue the setup, it will ask for ODBC DSN. Select the DSN from dropdown that we created before.
image
Enter the password for the username VCDBUser
image
Select “Upgrade existing vCenter server database
image
image
In production, you should put the Service Account username and password that you have created for vCenter service.
image
Continue with the setup. This takes time so be patience.
image
image
The Installation will continue with “vCenter Inventory Service”
image
image
image
Upgrade vSphere Client on XP/Win7 workstation using vCenter server 5.0 media.
image
That’s it. Smile.

Advertisement

Setup and Configure vSPhere Distributed Switch on vSphere 5.0

vSphere Distributed Switch which is referred as vDS functions as a single virtual switch across all associated ESXi hosts.

Like a vSwitch, virtual Distributed Switch provides connectivity to VMs as well as VM-Kernel interfaces.

vDS is connected to physical network via the NICs available on Host and thus these NIC’s acts as an “UpLinks” for our vDS.

To have a functioning vDS we need 2 ESXi Host and 2 NIC’s per Host.
In this Lab we have 2 Hosts and 2 NICs on each Host, 1 is an OnBoard NIC whereas an additional PCI-E NIC added. (
NIC Info)

Lets check the NICs on each host.
Select the Host and under “Configuration / Network Adapters” check for the available free NIC, Free in the sense that it is not associated to any vSwitch. You can see under the “Switch” column it says “None” whereas for the vmnic0 which is an onBoard NIC is connected to vSwitch0
image

Now we will go ahead to create a new vSphere Distributed Switch by going to “Networking” and selecting “New vSphere Distributed Switch” option.
image

Lets go through the wizard, where ever necessary I will explain the selected option.
image

For “Number of Uplink Ports” we will select ‘2’ . what we mean by selecting 2 is that we have 2 NIC (UpLinks) on each Host.
image
We will add the Hosts and connect the physical adapters to this vDS later.
image

We will create the “Port Group” later.
Image-0041

Once the wizard is complete we will have our 1st distributed switch named as “dvSwitch”.
Image-0042

We will rename the dvSwitch-DVUplinks-110 to “dvSwitch-DVUplinks” by selecting “Edit Settings” Image-0043
Image-0044

Now, let us rename the Uplinks, which will be helpful later.
Select the “dvSwitch” under “Configuration” select the “Settings” icon
Image-0045

Click “Edit Uplink Names” and lets name each uplink which will describe which NIC it is on our physical Host, Like I have named “OnBoard” and “PCI-E”
Image-0047
Image-0048

Now we will create the “Distributed Port Groups” Select “”New Port Group” and name the port group as “dv-VM-Network” and “Number of ports” as ‘128’
Which means there will be 128 ports associated with this port group.
We are not using any VLAN and hence will be “None” as default.

Image-0049

In case if you need to change Number of Ports or Name, you can go under “Edit Settings” options and do the changes.
In the “Summary” you will also find Total Ports and Available Ports which is helpful information which you start using this port group.
image

If you check the “Ports” tab you will see list of all Ports from 0-127.
image

Now we will add “Hosts” 
Select “dvSwitch / Add Host” and select appropriate NIC from each Host.
In case if you are confused which NIC to select (if you have more NICs) you can see “View Details…” link and check the NIC that you are using.
image

Next, the wizard will ask you to Migrate “Management Network” from vSwitch0 to a Port group on dvSwitch. we will not migrate for now.
so, keep the defaults as is and click Next.
image

In this section we will migrate VMs (Powered On and Powered Off) from vSwitch0 to dvSwitch. Under the “Destination Port Group” Column you can select the new Port Group (it’s a dropdown list)

You can see I am moving DC, Exchange Mailbox Server, Client Access Server, Hub Transport Server from “VM Network” Port Group which is on vSwitch0 to “dv-VM-Network” Port Group which is on dvSwitch. These VMs are currently Powered On on 192.168.1.101 Host.
Also, I am moving a Powered Off VM i.e, INT-CA a RootCA VM.

Also, check the VC VM which is a “vCenter Server” I am not moving it at present, coz we are creating/configuring Distributed Switch on vCenter server, to avoid loss of connectivity I will move vCenter later.

There is also a “Vyatta Router” VM which have 3 vNICs (virtual NIC) from these I am moving 1 vNIC to “dv-VM-Network” Port Group.
image

From 192.168.1.102 Host, I will be moving 1 vNIC of another “Vyatta Router” VM and a XP Client VM to new Port Group.
image

Here you will see all the VMs that we are migrating from vSwitch0 to dvSwitch.
Under vDS-DVUplinks you will see something strange. ie., The vmnic1 from both Hosts is shown under “OnBoard” uplink.
The Names that we have given to Uplink Group is Logical grouping, vSphere does not know which NIC is connected where (according to our naming).
How vsphere works is vmnic0 from each Host will goes under DVUplink1 and vmnic1 goes under DVUplink2 and so on…
In our case, vmnic0 which is an On-Board NIC is connected to vSwitch0 and which adding Host to dvSwitch we did not select vmnic0, we only selected vmnic1, when the time came to put vmnic under proper group, the only available vmnic was vmnic1 and that’s the reason why vmnic1 is shown under “OnBoard”.
We will correct this later. lets Finish this wizard and the dvSwitch is ready.

Image-0056
Check the Recent Tasks section at the bottom to see the updates going on.
Image-0057
The VMs network adapters are getting reconfigured and completed.
Image-0058
Check the “Summary” tab of any VM
Image-0065
Now lets correct the vmnic1 placement.
Go to the Host, under “Configuration” tab select “Networking” and click on “vSphere Distributed Switch” .
Click “”Manage Physical Adapters…” you will see vmnic1 under OnBoard, click “Remove”
Image-0061

Now Click on “Add NIC” and select vmnic1.
Image-0062
Image-0063
Repeat the same steps on other Host too..
Image-0064

Lets go and check the dvSwitch / Configuration. OK, so its as required.

image

Now its time to move “vCenter Server” to dvSwitch by going to the properties of vCenter VM and select the Network Adapter, select “dv-VM-Network” Port Group from dropdown list, and the VM is on dvSwitch.
image

**Moving Management Network (VMKernel Port) to dvSwitch**

 

Lets check the management network on both Hosts.

192.168.1.101
image
192.168.1.102
image
I have created a new Port Group on dvSwitch for VMKernel Port named “Mgmt-Network”
image

On dvSwitch / Configuration tab, select “Manage Hosts…” option and select both the Hosts.

imageimage

Select “Mgmt-Network” as Destination Port Group from the dropdown.
image
Image-0084

Once completed, you can see the VMKernel Ports are available under “Mgmt-Network” and vmnic0 is listed under “OnBoard”.
As I explained before, vmnic0 falls under DVUplink1 (which we renamed to OnBoard) and it did.
image

Finally, All bits are now together and the final vSphere Distributed Switch is as shown below.
image

Error: The Operation is not allowed in current state of the Host–while Powering On a Virtual Machine

At least once in your vSphere environment you will face an unfamiliar error. It’s a vague error message which popup when you try to power on a virtual machine.
Image-0022

Not really sure what causes this error all of a sudden, need to investigate more.

To fix this issue lets check the state of Host.
Host is running, but if you notice the summary page and look at the “Resources” section you will find the data for CPU / Memory Usage is not being pulled.

Image-0023
When I faced this error 1st, I did a restart of Host which solved the problem, but in some cases you can’t take this step unless you have planned to vMotion the VM’s to another host.

Another way is to “Remove” the host from vCenter and “Add” back again.

To remove the host, right click on the host and select “Remove”

Image-0024

This action will give a security alert, Click “Yes” to move ahead.

Image-0025

You can monitor the “Recent Tasks” for the status of your action.

Image-0026

Lets “Add” the Host again.
Right click on the “Datacenter Name” and select “Add Host…”

Image-0027

Go through the wizard process.
Image-0028

You will be prompted again with the Security Alert, Select “Yes” to move ahead.

Image-0029

Upon completion of wizard you can go through the summary once again.

Image-0030

And the Host will be added

Image-0032

Once the Task is complete, check the “Summary” page of the Host and check the “Resources” section.

Image-0033

Now try Powering On the virtual machine, and it should power on.

vmware vSphere Web Client Installation

This is in continuation with my previous post here

In this post, I will be writing up the installation procedure of vSphere web client.
We will be installing on the same server as we used for Inventory service and vCenter server i.e., vcentersrv.homelab.com

Select vSphere web client from menu and begin the installation.
image
image
image
image
image
image
Check the vSphere Web Client service has been started.
image

That’s all for installation of web client Smile

Lets login to web client, point the browser to https://192.168.1.205:9443/vsphere-client
image
image

My next article will be on Installing the second node of Single Sign On service.