Monday, September 7, 2009

Implementing vCenter4.0 in Clustering Services

The default installation of VI management server (vCenter 4.0) is on a the standalone windows server. In certain scenario's we might want to installed vCenter on clustered environment using MSCS (Microsoft Clustering Services). The following link below points to the best practices document and details the steps to configure vCenter 4.0 on MSCS and also the discusses the advantages and limitations of installing in clustered environment.

http://viops.vmware.com/home/docs/DOC-154
1

Friday, September 4, 2009

VM gets hung or performance is very slow

To prevent multiple access to running VM’s and take ownership of the VM, the ESX host establishes a lock on the VM files. Sometimes the lock is not released by the ESX host after the VM is shutdown or powered off and therefore can cause issue with powering on the VM and also sometimes causes performance issues with the VM and the VM would get hung.

Some of the VM files locked by the ESX host are:

.vswp

vmware.log

-flat.vmdk

.vmx

You may also face issues like:

· VM does not power- on

· VM gets hung or performance is very slow

To troubleshoot such issues need to identify the locked files and remove the lock.

Below are the steps to I followed to resolve the issue. Here the problematic VM is ‘sihai_test’

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ssh to the ESX server on which the VM is hosted

Get the following information

1) get world ID

# vm-support -x

VMware ESX Server Support Script 1.29

Available worlds to debug:

vmid=1197 dev-jonima

vmid=1214 qa-jonima2

vmid=1226 qa-fix-monitor

vmid=1254 dev-sihai

vmid=1261 dev-genghis1

2) get parent ID

# less -S /proc/vmware/vm/1254/cpu/status

scroll and locate parent ID (under group)

3) Find path of vmx files

# vmware-cmd –l

/vmfs/volumes/6f7d5a9b-06fb5da8/qa-jonima2/qa-jonima2.vmx

/vmfs/volumes/6f7d5a9b-06fb5da8/dev-jonima/dev-jonima.vmx

/vmfs/volumes/e697b65b-132e3f77/sihai_test/sihai_test.vmx

/vmfs/volumes/6f7d5a9b-06fb5da8/demo-rfq/demo-rfq.vmx

/vmfs/volumes/6f7d5a9b-06fb5da8/dev-shahbaz/dev-shahbaz.vmx

/vmfs/volumes/6f7d5a9b-06fb5da8/qa-fix-monitor/qa-fix-monitor.vmx

4) remove lock files and rename *vswp file

# cd /vmfs/volumes/e697b65b-132e3f77/sihai_test/

# ls -latr

# rm .lck-*

# mv *.vswp to anything

5) kill parent process

# /usr/lib/vmware/bin/vmkload_app -k ####

or

# /usr/lib/vmware/bin/vmkload_app -k 9 ####

6) kill remaining processes associated with vm

# ps -auxwww | grep sihai

# kill 11934

7) restart vmware management

# service mgmt-vmware restart

8) power-on VM

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

- Article Contributed by: Vishal Sinha

Email: vishalprofessional@gmail.com

Monday, August 3, 2009

How to enabled SSH in ESXi

ssh is disabled by default in ESXi however you can enabled ssh for troubleshooting purpose. ESXi has a hidden and unsupported console mode called "Tech Support Mode" where you can run some ESXi commands to manage and troubleshoot the ESXi server. Below are the steps to access the Tech Support mode and enabling ssh.

1. At the ESXi console screen, Press Alt+f1
2. Type "unsupported" (this is hidden) and enter.
3. Type the root password when prompted.

Tech Support Mode is now activated. To enable ssh to the server do the following steps.

4. Now type vi /etc/inetd.conf to edit the file
5. Search for line starting with “#ssh”
6. Remove the '#"
7. Save changes to the file by pressing esc and typing ":wq!"
8. Now restart the server. (Restart is required as restarting the management services does not enable it. Also to disable ssh will require a restart)