Clone and roll out template fail with “failed to connect to host”
Recently I implemented ESX 3.5 with VirtualCenter 2.5. After I installed the ESX Hosts and the VirtualCenter server the customer told me that I had to change the ip-addresses of the service console. I removed the ESX hosts from the VirtualCenter server, removed the vswif of both hosts with “esxcfg-vswif -d” and created it again with the correct ip-address and subnet. I added both hosts to the cluster again and every thing seemed to work again… until I decided to rollout a template. It took over 10 minutes before the error “failed to connect to host” appeared. Also cloning a VM gave me this same error. Weird thing is that creating, removing and starting VM’s worked fine. So I checked if I was able to clone via vmkfstools from the service console, this also worked. Weird… checked the host files, resolv.conf, sysconfig/network… everything okay.
After a couple of nights sleep I found it: /etc/opt/vmware/vpxa/vpxa.cfg contained the old ip-address in the field “hostIp”. I tried editing the file, but when ever I initiated a clone the hostIp was changed again to the old value. There was not much time left and I suspected the VirtualCenter database so I wiped it out with “vpxd.exe -b”. (Run this command on the VMware VirtualCenter server!) I created the Datacenter and Cluster again, added the hosts and started cloning… everything worked fine again. If any knows a better solution to the problem, because wiping out the VirtualCenter database isn’t my favorite solution, let me know!




January 24th, 2008 at 15:33
Dus toch de database….hmmm gebeurt iets te vaak de laatste tijd. Vraag me af of het iets met SQL 2005 te maken heeft….
January 25th, 2008 at 02:02
Echt niet normaal, het moest wel zoiets zijn… maar ja ga maar eens zoeken in welke bestand het oude IP adres is blijven hangen. En inderdaad, het “wipen” van de VC DB is niet wat je heel graag doet……..
February 11th, 2008 at 17:07
Had a similliar issue with the same error message when trying storage vmotion.
wiping the virtual center was not possible.
What I did was the following:
- assured the DNS stuff was setup correctly
- removed the host fom the vc server
- removed the vpxa.cfg on the host (acctually renamed it)
- rejoined the host to the vc server (this got me a new vpxa.cfg generated with the correct IP)
February 25th, 2008 at 18:45
Nice one Romeo!
That works a treat!! You saved me a rebuild of the ESX servers there.
Cheers!
March 4th, 2008 at 15:55
I ave found this to work too:
Stop the VMware VirtualCenter Server service
Edit the /etc/opt/vmware/vpxa/vpxa.cfg
Run this script on the database:
———–
UPDATE [VCDB].[dbo].[VPX_HOST]
SET [IP_ADDRESS] = ‘w.x.y.z’
WHERE [DNS_NAME] = ‘name of esx host as it is listed in the table’
———–
Of course w.x.y.z above is the new ip address
Start the VMware VirtualCenter Server service
The vpxa.cfg file might not have to be edited as it probably would have been changed by the VirtualCenter Service anyway, but I didn’t test that. I just know the above worked for me.
March 31st, 2008 at 18:53
If you check the file has has a different IP, I did the following to correct:
1. Removed the ESX host from Virtual Center.
2. Add the host again to Virtual Center.
3. Check the file, should reflect new IP.
Note: My error was “Failed to connect to Host”, occured when I tried to clone a VM.
April 1st, 2008 at 11:52
Al’s solution worked for me.
April 29th, 2008 at 20:25
Al, Thanks for the great tip. This worked for me as well.
1. Put the host in maintenance mode
2. Remove host from cluster
3. Add host back to cluster
4. Exit maintenance mode
5. Deploy VM from template
6. All is well.
May 20th, 2008 at 16:58
v4nilla’s steps resolved my issue.. Thanks a lot!!
June 19th, 2008 at 16:30
Thanks to all. Al’s solution worked for me.
First VM from a template is being deployed now.
July 1st, 2008 at 14:49
We experienced similar, however, simply Disconnecting (not Removing), and then Connecting was sufficient. This updated the VC tables and vpxa configuration on the host.
If you Remove, you lose all VM history, permissions, etc. I’d prefer not to discard all the history.
July 3rd, 2008 at 06:40
I just stopped the service(service vmware-vpxa stop)
edited vpxa.cfg
then restarted the service (service vmware-vpxa start)
and everyting worked great after that.
Hope this helps
July 3rd, 2008 at 17:38
BigRollTide… thank you. Works like a charm.