In what way to power ON ESXi Caller machine using CLI & in what way to link it to the User

I recently developed a Centralized Network observance System victimization Mikrotik’s base THE man. It’s an incredible free application through that you’ll utterly monitor your network atmosphere and might perform numerous task additionally victimization single screen via net or console. I superimposed numerous advance observance probes.

I decided to upgrade it from straightforward networking observance system to monitoring management system I used to be already victimization its tool menu through that i used to be able to do RDP to any target windows laptop, or conclusion / Power ON any laptop on the map or run any custom script to restart service on specific server, however the matter was that guest machines on VMWARE ESXI four.0 weren’t responding to WOL packets (Magic Packets to power ON machine over the network), I searched over the net however couldn’t found any answer to the present, therefore I created my very own scripts to meet the task.

First you wish to modify SSH on your VMware ESXi box,

Once SSH is enabled, check it by victimization any ssh consumer, as an example PUTTY.

After victorious logged in to ESXi host victimization putty, we’ve to search out the guest machine VM ID that we would like to power on, use the subsequent command to list all machines

vim-cmd vmsvc/getallvms

You will get result one thing like below, hunt for the VMID of the machine you would like to urge,

Vmid                   Name                                      File

112                     vmserver1 – WSUS                WSUS/WSUS.vmx
16                       vmserver2 – Symantec           symantec/symantec.vmx
96                       vmserver3 – SAMETIME        vmserver3/vmserver3.vmx

For example you would like to power ON the vmware1 – WSUS machine having vmid 112 , use the below command

vim-cmd vmsvc/powen.on  112

Now we are able to use higher than command and wrap it in any script or batch file or link it with the man tool menu

For example if you would like to execute higher than command victimization PLINK (Which is employed to execute command on remote ssh server victimization ssh tunnel) in any batch file, use the below command

\\dudepc\share\plink.exe -ssh -l root -pw zaibpass “vim-cmd vmsvc/power.on 112”

If you would like to link it to man Tool menu, Follow below steps
Open man console, from left menu, Goto TOOLS , Click on + sign to feature Tool

     Type: workable
     Name: Power ON ESXi Guess OS
     Command: \\dudepc\bin\plink.exe -ssh -l root -pw zaibpass ten.0.0.1 “vim-cmd vmsvc/power.on 112”

Click on okay to save , currently open your map, right click on your required target (vm guest) and go to tools menu, and your new tool are going to be showing there, click thereon and therefore the script can execute. Its counseled to check the command before swing it on any batch file or script.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here :