ESXi - vim-cmd

From Da Nerd Mage Wiki
Jump to navigation Jump to search

Some Handy Commands

  • List available VMs
    • vim-cmd vmsvc/getallvms
  • Check the power state of a VM
    • vim-cmd vmsvc/power.getstate [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms
  • Power on a VM
    • vim-cmd vmsvc/power.on [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms
  • Power off a VM
    • vim-cmd vmsvc/power.shutdown [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms
      • Requires that VM have VMware Tools installed
    • vim-cmd vmsvc/power.off [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms
      • Does not require that VM have VMware Tools installed
  • Reset a VM
    • vim-cmd vmsvc/power.reset [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms
  • Suspend a VM
    • vim-cmd vmsvc/power.suspend [VMID]
      • VMID: Found in list from vim-cmd vmsvc/getallvms