Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

VMware ESXi vim-cmd Commands

 VMware ESXi vim-cmd Commands


Commands available under vim-cmd/:






 As you can see, there are sub-command categories

let’s drive down each categories.

Virtual Machine Management Commands

Again, to find out what specific commands available in each category, you just type the

subcommand such as vmsvc here.

~ # vim-cmd vmsvc

Commands available under vmsvc/:

acquiremksticket get.snapshotinfo

acquireticket get.spaceNeededForConsolidation

connect get.summary

convert.toTemplate get.tasklist

convert.toVm getallvms

createdummyvm gethostconstraints

destroy login

device.connection logout

device.connusbdev message

device.disconnusbdev power.getstate

device.diskadd power.hibernate


device.diskremove power.on

device.getdevices power.reboot

device.toolsSyncSet power.reset

device.vmiadd power.shutdown

device.vmiremove power.suspend

devices.createnic power.suspendResume

disconnect queryftcompat

get.capability reload

get.config setscreenres

get.config.cpuidmask snapshot.create

get.configoption snapshot.dumpoption

get.datastores snapshot.get

get.disabledmethods snapshot.remove

get.environment snapshot.removeall

get.filelayout snapshot.revert

get.filelayoutex snapshot.setoption

get.guest tools.cancelinstall

get.guestheartbeatStatus tools.install

get.managedentitystatus tools.upgrade

get.networks unregister

get.runtime upgrade

Proxy Service Commands:-

This category of commands are associated with networking as you can see from the

following console output.

~ # vim-cmd proxysvc

Commands available under proxysvc/:

add_np_service disconnect port_info

add_tcp_service login remove_service

connect logout service_list

These commands are mostly straight-forward. Here is an example with port_info. The

information displayed from this command is consistent with the hostd configuration you

can find at /etc/vmware/rhttpproxy/endpoints.conf.

~ # vim-cmd proxysvc/port_info

Http Port: 80

Https Port: 443

~ # vim-cmd proxysvc/service_list

(vim.ProxyService.EndpointSpec) [

(vim.ProxyService.LocalServiceSpec) {

dynamicType = ,

serverNamespace = "/",

accessMode = "httpsWithRedirect",

port = 8309,


(vim.ProxyService.LocalServiceSpec) {

dynamicType = ,

serverNamespace = "/client/clients.xml",

accessMode = "httpAndHttps",

port = 8309,


(vim.ProxyService.LocalServiceSpec) {

dynamicType = ,

serverNamespace = "/ha-nfc",

accessMode = "httpAndHttps",

port = 12001,



(vim.ProxyService.LocalServiceSpec) {

dynamicType = ,

serverNamespace = "/sdk",

accessMode = "httpsWithRedirect",

port = 8307,


(vim.ProxyService.NamedPipeTunnelSpec) {

dynamicType = ,

serverNamespace = "/sdkTunnel",

accessMode = "httpOnly",

pipeName = "/var/run/vmware/proxy-sdk-tunnel",



Solo Commands :-

vim-cmd solo

Commands available under solo/:

connect environment logout querycfgoptdesc

disconnect login querycfgopt registervm

Most of the commands like environment, querycfgopt, querycfgoptdesc are for showing the

environment that a ComputeResource presents for creating and configuring a virtual

machine. The corresponding managed object is the EnvironmentBrowser in vSphere APIs.

~ # vim-cmd solo/querycfgoptdesc

(vim.vm.ConfigOptionDescriptor) [

(vim.vm.ConfigOptionDescriptor) {

dynamicType = ,

key = "vmx-03",

description = "ESX 2.x virtual machine",

createSupported = false,

defaultConfigOption = false,

runSupported = false,

upgradeSupported = false,


(vim.vm.ConfigOptionDescriptor) {

dynamicType = ,

key = "vmx-04",

description = "ESX 3.x virtual machine",

createSupported = true,

defaultConfigOption = false,

runSupported = true,

upgradeSupported = true,


(vim.vm.ConfigOptionDescriptor) {

dynamicType = ,

key = "vmx-07",

description = "ESX/ESXi 4.x virtual machine",

createSupported = true,

defaultConfigOption = false,

runSupported = true,

upgradeSupported = true,


(vim.vm.ConfigOptionDescriptor) {

dynamicType = ,

key = "vmx-08",

description = "ESXi 5.0 virtual machine",

createSupported = true,

defaultConfigOption = false,

Hostsvc commands :-

~ # vim-cmd hostsvc

Commands available under hostsvc/:

advopt/ enable_ssh


autostartmanager/ firewall_disable_ruleset reset_service

datastore/ firewall_enable_ruleset runtimeinfo

datastorebrowser/ get_service_status set_hostid

firmware/ hostconfig


net/ hosthardware


rsrc/ hostsummary


storage/ login start_service

summary/ logout start_ssh

vmotion/ maintenance_mode_enter stop_esx_shell

connect maintenance_mode_exit stop_service

cpuinfo pci_add stop_ssh

disable_esx_shell pci_remove task_list

disable_ssh queryconnectioninfo


disconnect querydisabledmethods

enable_esx_shell refresh_firewall

Most of these command categories are self explantory, for example, datastore,

autostartmanager, datastore, datastorebrowser, firmware, storage, summary, vmotion. Note

that the summary is not really the same as you find from summary property of HostSystem

managed object in vSphere API.

To find out what is there in summary, just type the command:

~ # vim-cmd hostsvc/summary

Commands available under hostsvc/summary/:

fsvolume hba scsilun

The three commands there are really for listing file system volumes, host based adapters,

and SCSI LUNs.

HBR is replication related commands

# vim-cmd /hbrsvc

Commands available under /hbrsvc/:

vmreplica.abort vmreplica.pause

vmreplica.create vmreplica.queryReplicationState

vmreplica.disable vmreplica.reconfig

vmreplica.diskDisable vmreplica.resume

vmreplica.diskEnable vmreplica.startOfflineInstance

vmreplica.enable vmreplica.stopOfflineInstance

vmreplica.getConfig vmreplica.sync


~ # vim-cmd /hbrsvc/vmreplica.getState

Insufficient arguments.

Usage: vmreplica.getState vmid

Get the state of the specified replication group

~ # vim-cmd /hbrsvc/vmreplica.getState 8

Retrieve VM running replication state:

(vim.fault.ReplicationVmFault) {

dynamicType = ,

faultCause = (vmodl.MethodFault) null,

reason = "notConfigured",

state = ,

instanceId = ,

vm = 'vim.VirtualMachine:8',

msg = "vSphere Replication operation error: Virtual machine is not configured for replication.",


Internal Service Commands

Again these commands are not related to the internal APIs, but rather services for performa

possible commands, just type as follows:

This post first appeared on Vmkfix, please read the originial post: here

Share the post

VMware ESXi vim-cmd Commands


Subscribe to Vmkfix

Get updates delivered right to your inbox!

Thank you for your subscription