Many of us still evaluating the vSphere and vCenter in our test environments. Sometimes, it takes more than 60 days to evaluate where trial edition expires.
We can't extend the trial edition in ESX host, either we have to reinstall it or license it. vCenter also have to follow the same way as ESX does. But, here we can keep old database contents as it is when you reinstall the vCenter software.
This document using vCenter 4.0 and SQLEXPRESS 2005 (built in) database. At the time of installation of vCenter 4.0, it installs SQLEXPRESS 2005 by default unless any other Database specified. Mostly, we are using built-in database is SQLEXPRESS 2005 for testing environment.
When you install vCenter 4.0, it installs SQLEXPRESS 2005 and creates a database called "SQLEXP_VIM". You can view this thru SQL Server Configuration Manager console.
Start à All Programs à Microsoft SQL Server 2005 à Configuration Tools à SQL Server Configuration Manager
Creating DSN
Create a System DSN for this database using ODBC (Administrative Tools à Data Sources (ODBC) either before/after expiry of your vCenter trial period.
Open the ODBC Database Administrator Source, Select "System DSN" and Click "Add" Button and Select "SQL Native Client"
Provide the Datasource name (recommened to use as "SQLEXP_VIM")
Select, the server and database name (mostly local host, since it is installed on the same server where we installed vCenter earlier)
Leave the Authentication as default. It is important to change the default database to
VIM_VCDB as shown in the picture: (Select in the list)
Press Next and leave them to default settings and Test Connectivity.
Use the Add/Remove Programs to uninstall the vCenter 4.0 after trail period is over.
Reinstalling the vCenter
When you reinstall the vCenter on same server, select the "Use an existing supported database" on database section. Then, enter "sqlexp_vim" as the DSN and press "Next" and leave blank for UN/PW
Select "Do not overwrite, leave my existing database in place" and press "Next", leave it default
After complete database selection, continue with your installation as usual.
Once the vCenter installation completed, open it thru vSphere Client, you can see your old settings such as Datacenter, Cluster and other configuration. Again, your evalution periods starts with 60-days again.
Comments
net stop "VMware VirtualCenter Server" /y
start /wait VMware-vcserver.exe /s /w /L1033 /v" /qr WARNING_LEVEL=0 USERNAME=\"Username\" COMPANYNAME=\"Company\" DB_SERVER_TYPE=Custom DB_DSN=\"VIM_SQLEXP\" VPX_USES_SYSTEM_ACCOUNT=1
shutdown /r /d P:4:2
Stop vCenter service
#service vmware-vpxd stop
Backup the vCenter appliance database
#mkdir /tmp/bkp
#chown db2inst1: /tmp/bkp
#db2 force applications all
#db2 backup db vcdb to /tmp/bkp
Copy the file locally (scp...)
Delete from disk the current vcenter
Re-deploy the appliance. Change IP@, …
Stop vCenter service (if started)
Create the tmp dir /tmp/bkp
mkdir /tmp/bkp ; chown db2inst1: /tmp/bkp
Copy the file to the new vcenter (scp … /tmp/bkp)
Restore the vCenter appliance database
db2 restore db vcdb from /tmp/bkp replace existing
Start vCenter service (service vmware-vpxd start)
Just requires a couple of changes depending on your setup
Where he has "VMware-vcserver.exe" it should be the path or share where the install application is installed from (mine is D:\vCenter-Server\VMware-vcserver.exe) i.e the cd
And the DSN entry is the one you specified in odbc(mine is vSphere), just check under Data sources (ODBC) mines in system.
I've created a Schedule to run every 55 days :)
Cheers to all
my batch file resetvspherelic.cmd
net stop "VMware VirtualCenter Server" /y
start /wait D:\vCenter-Server\VMware-vcserver.exe /s /w /L1033 /v" /qr WARNING_LEVEL=0 USERNAME=\"Username\" COMPANYNAME=\"TOMTIT\" DB_SERVER_TYPE=Custom DB_DSN=\"vCenter\" VPX_USES_SYSTEM_ACCOUNT=1
shutdown /r /d P:4:2
For the Linux way here is the text file I wrote and I use these every time I have to refresh the license. Tedious, but still so much better than redeploying the entire vCenter + the ESX hosts + the VMs.
Backup DB:
service vmware-vpxd stop
mkdir /tmp/ChrisBackup
chown db2inst1: /tmp/ChrisBackup
su - db2inst1
db2 force applications all
db2 backup db vcdb to /tmp/ChrisBackup
Copy the file locally (winscp from /tmp/ChrisBackup)
Remove the vCenter VM and rename the folder to something like vCenter.expired (just in case)
Re-deploy the appliance (see Setup Details)
Setup Details:
This appliance contains System Disk, Data Disk and the OVF File.
You do not have to copy the files. Simply double click on the OVF file and VMware Workstation will import the VM.
Once import is completed, reduce the vRAM from 8GB to 4GB and start the VM.
Once started configure the IP address and time settings
Connect to https://(some IP address):5480/
* * * * Accept the EULA * * * *
root
vmware
1) Accept the EULA the first time you log on to the web interface
2) Configure DB
3) Restore DB (see Restore DB)
4) Start vCenter
For redeployment, right click to reconnect to each of the ESX server in the vCenter inventory.
Restore DB:
service vmware-vpxd stop
mkdir /tmp/ChrisBackup
chown db2inst1: /tmp/ChrisBackup
Copy the file to the new vcenter (winscp to /tmp/ChrisBackup)
chown db2inst1: /tmp/ChrisBackup/VCDB(Keyboard Tab Key)
su - db2inst1
db2 restore db vcdb from /tmp/ChrisBackup replace existing
exit
service vmware-vpxd start
Chris
The power of Cloud.....
Tried everything with no success - only complete reinstall with database overwriting can reset evaluation period
No doubt there will be a way but thanks for posting your experiences with it.
I have good (or bad) news about resetting vCenter server 5.1 eval period. In this version 5.1, it saves information about evaluation date somewhere in the SQL database VIM_VCDB.
I've completely uninstalled SSO, Inventory, and vCenter from Add/Remove programs, and then manually deleted all VMware files, logs and so on and only VIM_VCDB database stayed untouchable...
After that I've done fresh install of the VMware vCenter Simple Install and during this installation I've selected "Do not overwrite, leave my existing database in place". After the installation evaluation period of the vCenter server didn't reset. If I only do reinstalling vCenter server with the overwriting VIM_VCDB database, then evaluation date successfully resets.
Regards,
Victor
did anyone tested it with PostgreSQL embalmed DB ,I have vCenter Applicance 5.0.1 and I need to renew to trial version.
Regards
Sofiane
Thanks a lot, you make my day. i did with VMware vcenter 5.0 version it working like charms.