Home · Latest · Trends  /  Virtual Machine
0

Power on a vmware virtual machine from the command line

rated 0 times [  0] [ 0]  / comments: 1 / hits: 417  / 10 months ago, wed, feb 22, 2017, 13:52:39
This is how you would list available VMs, get their state, then power them on/off via command line / shell.
# List the inventory ID of the virtual machine with the command:
vim-cmd vmsvc/getallvms |grep <vm name>

# 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>
More From » Virtual Machine
 

Comments

1
In KVM:
#List Running VMs:
virsh list

#List All VMs:
virsh list --all

#Start a VM:
virsh start VM_NAME
[#2] Monday, March 20, 2017, 11:41:42
 
dj
commented 9 months ago
dj
Only authorized users can post. Please sign in first, or register a free account
 
Share
Sponsor
Posted
rob

rob

Member since Feb 22, 2017
Total Code Snippets: 98
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017
10 months ago, wed, feb 22, 2017