יום שלישי, 4 בפברואר 2014

Power on / off / suspend a virtual machine on an ESXi host from CLI

  1. Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file, using this command:

    vim-cmd vmsvc/getallvms
  2. To get the current state of a virtual machine:

    vim-cmd vmsvc/power.getstate VMID
  3. Shutdown the virtual machine using the VMID found in Step 2 and run:

    vim-cmd vmsvc/power.shutdown VMID

    Note: If the virtual machine fails to shut down, use this command:

    vim-cmd vmsvc/power.off VMID
      4. Suspend the virtual machine:
              vim-cmd vmsvc/power.suspend VMID
     


אין תגובות:

הוסף רשומת תגובה