VMWare : KB2000015 : Collecting vCenter Server logs when an alarm is triggered Purpose

To trigger the collection of vCenter Server logs when a particular error occurs:

  1. Create an alarm on the host in vCenter Server with the desired settings.
  2. Click the Actions tab in the Alarm Settings dialog.
  3. Click Add and select Run a command in the Action dropdown.
  4. Click the Configuration field and enter the command to run when the alarm is triggered. To collect the vCenter Server logs, enter:

    C:\Windows\System32\cscript.exe "C:\Program Files\VMware\Infrastructure\VirtualCenter Server\scripts\vc-support.wsf" /z

    Note: Ensure that you select the correct status for the Action. The status must match the status defined in the Triggers tab.

When this action is triggered, the vCenter Server log files will be located in C:\Windows\System32\config\systemprofile\Desktop.

 

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

Advertisements

VMWare : ESXi – Powering on a virtual machine from the command line

1. Enable SSH on the ESXi host ( from vSphere client or directly from the console ).

2. Connect to the host using an SSH client ( e.g. PuTTY ) and login using the root account

3. List the inventory ID of the virtual machine with the command:

 vim-cmd vmsvc/getallvms |grep <vm name> 

         **Note: The first column of the output shows the vmid.

4. Check the power state of the virtual machine with the command

vim-cmd vmsvc/power.getstate <vmid>

5. Power-on the virtual machine with the command:

vim-cmd vmsvc/power.on <vmid>