Thursday, September 2, 2010

vmware tips

cannot connect to host error in vmware

Solution:

1.

Sometimes while trying to access the console of a virtual machine using the VMware Virtual Infrastructure Client (connected to the ESX host or the virtual center) the following error appears:

Error connecting: cannot connect to host : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Do you want to try again?

This error could be produced if a firewall exists between the virtual infrastructure client and the host where the virtual machine is running blocking the TCP 903 port. If this is the case configure your firewall to allow trafic from the vi client to the physical host on port 903.

In other cases the only way to solve this is to enable the vmauthd proxy on the service console of the host. To do that we need to edit the file /etc/vmware/config adding the following line:

vmauthd.server.alwaysProxy = “TRUE”

The file should look like this:

libdir = “/usr/lib/vmware”
authd.fullpath = “/usr/sbin/vmware-authd”
authd.client.port = “902″
vmware.fullpath = “/usr/bin/vmware”
control.fullpath = “/usr/bin/vmware-cmd”
serverd.fullpath = “/usr/sbin/vmware-serverd”
serverd.init.fullpath = “/usr/lib/vmware/serverd/init.pl”
authd.proxy.vim = “vmware-hostd:hostd-vmdb”
authd.proxy.nfc = “vmware-hostd:ha-nfc”
authd.proxy.nfcssl = “vmware-hostd:ha-nfcssl”
authd.soapServer = “TRUE”
authd.proxy.vpxa-nfc = “vmware-vpxa:vpxa-nfc”
authd.proxy.vpxa-nfcssl = “vmware-vpxa:vpxa-nfcssl”
vmauthd.server.alwaysProxy = “TRUE”


Check for vpxa version: rpm -qa |grep vpxa
You should see something like VMware-vpxa-2.5.0-104215, you'll use this later

Stop the VMware management service: service mgmt-vmware stop

Stop the vpx agent: /etc/init.d/vmware-vpxa stop

Uninstall vpx agent: rpm -e VMware-vpxa-2.5.0-104215
Expect the following, ‘warning: /etc/vmware/vpxa.cfg saved as /etc/vmware/vpxa.cfg.rpmsave'

Verify vpxa has uninstalled: rpm -qa |grep vpxa (or vpx just in case)

Start the VMware management service: service mgmt-vmware start

Now go back into VirtualCenter and remove the disconnected host and add the host. Initially, it may fail with bad username or password or another error, but try again and it should work.



No comments:

Post a Comment