Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client
search cancel

Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client

book

Article ID: 345049

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to power on virtual machines from the command line (either through the ESX host console or through the RCLI/vSphere CLI) if the host cannot be managed from vCenter Server or from the vSphere Client.


Environment

VMware vSphere ESXi 5.0
VMware vSphere ESXi 6.0
VMware vSphere ESXi 6.7
VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 8.0.x
VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5

Resolution

Note: The steps in this article require root access to the host, either at the physical console or using SSH. For more information on enabling root access, see:

ESXi 4.x, 5.x, 6.x, 7.0.x and 8.x

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:

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

    Note: The first (leftmost) column of the output shows the vmid.
     
  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>
     
  3. Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on <vmid>
Note: vim-cmd depends on hostd working properly. If hostd is stopped, you might see the following error after executing vim-cmd:
 
Failed to login: Connection refused: The remote service is not running, OR is overloaded, OR a firewall is rejecting connections.


Additional Information

For more information, see:
Tech Support Mode for Emergency Support
Determine the power status of a virtual machine on an ESX or ESXi host
Investigating virtual machine file locks on ESXi
Unable to power off the virtual machine in an ESXi host
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
vSphere Client を使用してホストを管理できない場合にコマンド ラインから仮想マシンをパワーオンする
无法使用 vSphere Client 管理主机时从命令行打开虚拟机电源
Encender una máquina virtual desde la línea de comandos cuando el host no puede administrarse mediante vSphere Client
Ligando uma máquina virtual através da linha de comando quando o host não pode ser gerenciado usando o vSphere Client
Einschalten einer virtuellen Maschine über die Befehlszeile, wenn der Host nicht mit vSphere Client verwaltet werden kann
Enabling root SSH login on an ESX host