Mostly used VMWare shell commands

Esxi related shell commands

chkconfig –list–Lists all services

/sbin/service.sh restart–Restart all management services

/etc/init.d/servicename restart–Restart single service

vicfg-cfgbackup –s /tmp/hostname.cfgbak–Backup host configuration

esxcfg-info  >  /tmp/esxcfg-info.txt–Export detailed configuration file

esxcli  vm  process list–List running vm’s

esxcli  hardware cpu list–List cpu detailed functions

esxcli  hardware cpu global get–Show cpu supported functions

esxcli  system visorfs ramdisk list–List free memory allocated to ramdisks

esxcli  system version get–Show version information for ESXi

esxcli  software acceptance get–Show the hosts acceptance level

esxcli  system syslog config get–Show syslog configuration

esxcli  network firewall get–Lists firewall status and actions

esxcli  network firewall ruleset list–Lists firewall rulesets

esxcli network firewall refresh–Refresh firewall adding new ruleset

vmkerrcode errorcodenumber— Show description of VMKernel error

esxcli  system module list–Lists drivers loaded at startup

esxcli  system settings advanced –l–Lists advanced options

VM related shell commands

esxcli  vm  process list–List running vm’s

vim-cmd  /vmsvc/getallvms–List registered vm’s

vim-cmd  /vmsvc/power.getstate  vmid--Show vm’s power state

vim-cmd  /vmsvc/power.on vmid–Power on vm

vim-cmd  /vmsvc/power.off vmid–Power off vm

vim-cmd  /solo /register /vmfs/volumes/vmname/vmname.vmx–Register a vm

vim-cmd /vmsvc/unregister vmid–Unregister a vm

esxcli vm process kill –type –world-id id–Forcibly kill vm (type = soft/hard/force)

vmkfstools–Create/Delete/Modify VMDKs, RDMs, VMFS Volumes & storage devices

Find the storage and networking related commands here..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s