VMware Cloud Community
sdietz
Contributor
Contributor

Can't login into vSphere but can login via SSH

All of a sudden we are no longer able to login into the vSphere client. We are running ESXi 4.0 (Free verision). It was working great for months and then just stopped. I still have SSH access.

I've been following this KB article in regards to the issue:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100356...

However, when I log into SSH with the root user, it's not finding the services or not letting me run commands. Example:

~ # /sbin/service --status-all

-ash: /sbin/service: not found

~ # /etc/vmware/service --status-all

-ash: /etc/vmware/service: Permission denied

~ # service firewall stop

-ash: service: not found

Any ideas? All VM's are currently shutdown and I can't even start them up from the SSH. HELP!!!

PS - If all VM's are shutdown is it safe to do a "Reset System Configuration" from the console. I am just worried I will loose all VM's on the datastore.

Thanks,

0 Kudos
13 Replies
mittim12
Immortal
Immortal

That KB is for ESX which is a tad bit different than ESXi so those commands aren't available. If the VM's are already shutdown have you tried to restart the host to see if it that helps?






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
Troy_Clavell
Immortal
Immortal

can you get to the console and try and restart the management agents?

See below for ESXi

http://kb.vmware.com/kb/1003490

sdietz
Contributor
Contributor

Yes, I've reboot the host mutilple times. I edited the autostartup config and disable autostartup per the KB article. Do you know what the commands are to startup a VM in ESXi 4.0 from SSH?

0 Kudos
sdietz
Contributor
Contributor

Yes, but here are the results:

~ # service mgmt-vmware restart

-ash: service: not found

I was able to reset from the actual console. It shows a successul restart but still no luck of logging into vSphere.

0 Kudos
mittim12
Immortal
Immortal

Are you connecting via IP or DNS name? Can you ping the IP? ( just trying to verify network connectivity).






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
Troy_Clavell
Immortal
Immortal

as stated, you are trying to use ESX command, and they won't work. Did you see the bottom of the KB article that show's you how to restart the management agents in ESXi?

...or run

/sbin/services.sh restart

sdietz
Contributor
Contributor

I am using Putty to SSH to the IP address. I can successfully ping to the IP on the network.

0 Kudos
mittim12
Immortal
Immortal

You can try this, http://www.petri.co.il/forums/showthread.php?t=39926, or try downloading and using VMA.






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
sdietz
Contributor
Contributor

I was able to run the command but still can't login into vSphere Smiley Sad

My output:

~ # /sbin/services.sh restart

Running sfcbd-watchdog stop

sh: cannot kill pid 9671: No such process

Running wsman stop

Stopping openwsmand

Running slpd stop

Stopping slpd

Running vobd stop

watchdog-vobd: Terminating watchdog with PID 9533

Vobd stopped.

Running hostd stop

watchdog-hostd: PID file /var/run/vmware/watchdog-hostd.PID not found

watchdog-hostd: Unable to terminate watchdog: Can't find process

sh: cannot kill pid 11565: No such process

Running ntpd stop

Stopping ntpd

Running ntpd restart

Starting ntpd

Running hostd restart

mount: mounting visorfs on /var/lib/vmware/hostd/stats failed: File exists

Running vobd restart

Begin 'hostd ++min=0,swap,group=hostd /etc/vmware/hostd/config.xml', min-uptime = 60, max-quick-failures = 1, max-total-failures = 1000000

Vobd started.

Running slpd restart

Starting slpd

Running wsman restart

Starting openwsmand

Running sfcbd-watchdog restart

Is there a command to start up a VM from SSH? That would help a LOT as my domain controller is down and the building is without internet and getting antsy.

Thanks!

0 Kudos
sdietz
Contributor
Contributor

No luck with that article.

Output:

~ # vim-cmd vmsvc/getallvms

Failed to connect: 514 Error connecting to hostd-vmdb service instance.

0 Kudos
mittim12
Immortal
Immortal

I would try to download the remote CLI or the VMA and see if that will work for you.






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
sdietz
Contributor
Contributor

When trying to connect with vCLI (latest version available) I am getting this error

"Error connecting to server at https://192.168.1.2/sdk/webService': Perhaps host is not a virtual center or ESX server

When I tryed to connect via vCLI I used the IP address of ESXi box, 192.168.1.2

0 Kudos
sdietz
Contributor
Contributor

I ended up opening a support ticket with VMWare to resovle this issue. The issue was caused by the hostd service not starting up properly. The hostd service is what allows users to connect to the ESXi server. This was caused by a corrupt .vmx file. What the support technician did was remove all VM's from the vmInventory.xml file. Be sure to make a backup if you are going to try to the same procedure. Once the vmInventory.xml file contained no VM's, we restarted the services and I was able to login in with vSphere. I then went back in and added each VM to the inventory one by one until we found the corrupt .vmx

Hope that can help someone along the way!

0 Kudos