Thursday, May 13, 2010

Inactive VM to Activate VM On ESX

This Doc. Doesn’t carry any Client Environment screen shots or any related information.
Make sure you have done with below steps from GUI.
1. Connect VMware Infrastructure (VI) Client to the Virtual Center Server. Right-click on the virtual machine and click Power off.
2. Connect VI Client directly to the ESX host. Right-click on the virtual machine and click Power off.
*If this does not work, you must use the command line method.
Powering off the virtual machine using the vmware-cmd command
This procedure uses the ESX command line tool, and attempts to gracefully power off the virtual machine. It works if the virtual machine's process is running properly and is accessible. If unsuccessful, the virtual machine's process may not be running properly and may require further troubleshooting.
Connect via PuTTy
1. From the Service Console of the ESX host, run the following command: vmware-cmd stop Note: is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command: # vmware-cmd getstate
2. From the Service Console of the ESX host, run the command: # vmware-cmd stop hard Note: is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command: # vmware-cmd getstate
3. If the virtual machine is still inaccessible, proceed to the Option -2 section below.
Option -2
Powering off an unresponsive virtual machine on an ESX host via Command line.
Make sure you have the below available before you start.
1. Connect VMware Infrastructure (VI) Client to the Virtual Center Server. Right-click on the virtual machine and click Power off.
2. Connect VI Client directly to the ESX host. Right-click on the virtual machine and click Power off. If this does not work, you must use the command line method.
Determining the virtual machine's state
1. Determine the host on which the virtual machine is running. This information is available in the virtual machine's Summary tab when viewed in the VI Client page.
2. Log in as root to the ESX host using an SSH client.
3. Run the following command to verify that the virtual machine is running on this host: # vmware-cmd -l The output of this command returns the full path to each virtual machine running on the ESX host. Verify that the virtual machine is listed, and record the full path for use in this process. For example: # /vmfs/volumes///.vmx
4. Run the following command to determine the state in which the ESX host believes the virtual machine to be operating: # vmware-cmd getstate If the output from this command is getstate() = on, the VirtualCenter Server may not be communicating with the host properly. This issue must be addressed in order to complete the shutdown process. If the output from this command is getstate() = off, the ESX host may be unaware it is still running the virtual machine. This article provide additional assistance in addressing this issue.
Powering off the virtual machine while collecting diagnostic information using the vm-support script
Use the following procedure when you want to investigate the cause of the issue. This command attempts to power off the virtual machine while collecting diagnostic information. Perform these steps in order, as they are listed in order of potential impact to the system if performed incorrectly.
Perform these steps first:
1. Determine the WorldID with the command: # vm-support -x

2. Kill the virtual machine by using the following command in the home directory of the virtual machine: # vm-support -X This can take upwards of 30 minutes to terminate the virtual machine. Note: This command uses several different methods to stop the virtual machine. When attempting each method, the command waits for a pre-determined amount of time. The timeout value can be configured to be 0 by adding -d0 to switch to the vm-support command.
If the preceding steps fail, perform the following steps for an ESX 3.x host:
1. List all running virtual machines to find the VMID of the affected virtual machine with the command: # cat /proc/vmware/vm/*/names
2. Determine the master world ID with the command: # less -S /proc/vmware/vm/####/cpu/status
3. Scroll to the right with the arrow keys until you see the group field. It appears similar to: Group vm.####
4. Run the following command to shut the virtual machine down with the group ID: # /usr/lib/vmware/bin/vmkload_app -k 9 ####

No comments:

Post a Comment