Upgrade VMware vCenter Lab Manager 4.0.0 to 4.0.1 fails
Dec 22, 2009 Blogs
I’ve upgraded my employer’s Lab Manager installation to 4.0.1 last thursday. I followed procedure by disallowing new deployments, undeploying all virtual machines, making sure nobody could login, double-decked that no event were currently running and make backups of the virtual machine and database files.
I commenced the upgrade, and clicked through the installer. The upgrade went smooth as far as I could see. After the upgrade, I went to the webpage of the LM-server to finish the upgrade wizard. Instead of the upgrade wizard, I was welcomed by the initialization wizard. It scared the hell out of me, this was not supposed to happen!
I assumed the installer did a boo-boo with the database, replacing it with a fresh one instead of upgrading the old one. I was right, in the installation directory of SQL I found the ‘old’ database in a *.renamed format. The new database files were smaller and had newer modified dates.
To restore the database, I had to do the following:
- Stop the HTTP SSL, IIS Admin Service, World Wide Web Publishing Service, VMware vCenter Lab Manager Monitor and VMware vCenter Lab Manager SupportLink services.
- Make sure that the ‘SQL Server (LABMANAGER)’ service is running.
- Restore the database using osql.
- Restored user rights to the LabManager database using osql.
- Restarted the above services (including the SQL Server).
I used osql for all the database interaction. You can use Microsoft SQL Server Management Studio Express as well.
Restore the database:
OSQL -S localhost\labmanager -E -Q "restore database labmanager FROM DISK='c:\lm_backup.bak' with replace"
Restore the user rights to the database:
osql -S localhost\LabManager -E USE [LabManager] GO CREATE USER [LAB\VMwareLMClientAccts] FOR LOGIN [LAB\VMwareLMClientAccts] GO USE [LabManager] GO EXEC sp_addrolemember N'db_datareader', N'LAB\VMwareLMClientAccts' GO USE OLTP GO EXEC sp_change_users_login 'auto_fix','LAB\VMwareLMClientAccts' GO
For future reference: backups of the database are made using this command:
OSQL -S localhost\LabManager -E -Q "backup database labmanager TO DISK='c:\lm_backup.bak'"
December 22nd, 2009 at 13:45
[...] Dit blogartikel was vermeld op Twitter door VMware Planet V12n, Joep Piscaer. Joep Piscaer heeft gezegd: New blog post on Virtual Lifestyle: Upgrade VMware vCenter Lab Manager 4.0.0 to 4.0.1 fails http://bit.ly/6w5LIC [...]
December 23rd, 2009 at 22:18
Ouch and scary! Nice job recovering. Our Lab Manager servers are VMs so we just take a snpashot before hand.
December 24th, 2009 at 11:51
I wish I had taken a snapshot of my Lab Manager VM
.