Adventures in Tech
Changing ESX virtual centre server when original virtual host no longer availablePosted at: 2009-07-14 @ 16:53:04
Just a quick post today but I wanted to share something useful I discovered.I've got a vmware esx server that is setup and is managed using virtual centre. Due to hardware limitations we have virtual centre running inside a vmware on the esx server.
I know this isn't best practice, however it is a supported configuration by vmware.
Recently we had a power outage that rebooted the server and the vm running virtual centre wasn't setup to start automatically so the virtual centre server didn't come back up.
This virtual centre server also handles the licensing for the esx host. Due to there being no licensing server available, after the 14 day grace period, esx wouldn't allow any new vm's to be started as it didn't have a license.
This presented me with a problem, I needed to start up the virtual centre server to fix the licensing issue, however esx didn't have any licenses to start the vm up........ URHHHHHHHHHHHHH!!!!!!!!!!!
I figured the only solution would be to bring up another server with virtual centre installed and point the esx server at that so it would have a license and then allow me to boot up the vm before repointing the esx host back to its vm virtual centre.
However there is a problem a I quickly discovered, ESX won't let you remove a virtual centre from managing it, unless it can contact that virtual centre server to say "goodbye".
You can add the ESX host into the other virtual centre however it quickly disconnects and you can't manage it at all.
After a bit of head scratching I found a solution.
1. ssh to your esx host.
2. Edit your license.cfg file in /etc/vmware/license.cfg (vi /etc/vmware/license.cfg as root will do it)
3. Here we have 2 possible solutions. 1, empty the file or 2, modify the line that reads like SERVER=27000@192.168.1.10 to something else.
I've found that solution 2 doesn't seem to work, I found solution 1 worked for me, but from the vmware docs option 2 should work.
4. Then run /sbin/service mgmt-vmware restart
Your ESX host will now reboot and if you went option 1 at step three you will be able to add the ESX host back into another virtual centre server.
Problem solved!