Posts Tagged ‘Virtualisation’

Configure logs to be sent to External Syslog Server (Synology) using ESXi Web Host Client

January 10, 2017 Leave a comment

Step 1 – Add the external log server

Go to Manage > System > Advanced Settings and locate and edit settings.

Add the following: udp://

Step 2 – Configure Firewall rules to allow access to external syslog server.

Go to Host > Networking > Firewall Rules and locate syslog and edit settings:

Select Only allow connections from the following networks and enter the external syslog server.



VMware – Commands to power on VMs from command line

November 10, 2016 Leave a comment

ESXi 5.x and 6.0

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.

Check the power state of the virtual machine with the command:

vim-cmd vmsvc/power.getstate <vmid>

Power-on the virtual machine with the command:

vim-cmd vmsvc/power.on <vmid>

ESX 4.0 and ESX 4.1

To list the path of all the virtual machines on the host:

vmware-cmd –l

Get the state of the virtual machine with the command:

vmware-cmd <path to the VMX file> getstate

Power on the virtual machine with the command:

vmware-cmd <path to the VMX file> start

How to create RDM (Raw Device Mapping) on ESXi host

May 5, 2014 Leave a comment
  1. Run fdisk -l to see all the disks available to ESXi host.
  2. Run /dev/disks/ -l to find out VML ID, which will be used in the command to create RDM.
  3. Create a folder (i.e. RDMs) for mapping file(s) on the DataStore
  4. Create the mapping files with LSILogic controller using the following command
    vmkfstools -r /vmfs/devices/disks/vml.01000000002020202020202020202020205733383132564439535431303030 RDM1.vmdk -a lsilogic
    Two mapping files (RDM1.vmdk and RDM1-flat.vmdk) were created. (Note: file appears to your total disksize but it actually takes no space).
  5. Go to your VM and add the mapping file as a second disk. Select the option existing disk and point to the RDM1.vmdk file.


Source: vm-help

Power on/off VM via local ESXi Shell

April 30, 2014 Leave a comment
Enabling local shell access in direct console
  1. On ESXi host press the F2 button and log in with your credentials when prompted.
  2. In the list go on Troubleshooting Options and press Enter.
  3. Then choose Enable ESXi Shell and press Enter (On the right you will notice that ESXi Shell is Disabled changes to Enabled).
  4. To exit the menus and log out press ESC until you return to the main screen.

How to power on (or off) the VM (ESXi 5.x)

You need to know the id (VMID) of the VM you plan to turn on plus start up and shutdown commands

  1. Command to list the inventory ID of the VM
    vim-cmd vmsvc/getallvms | grep VM_NAME
  2. Check the VM state (Is it powered on?)
    vim-cmd vmsvc/power.getstate VMID
  3. Power on the VM
    vim-cmd vmsvc/power.on VMID
  4. Shutdown and power off the VM
    vim-cmd vmsvc/power.shutdown VMID
    vim-cmd vmsvc/ VMID


Source: VMware KB