Showing posts with label VMware ESXi basic command. Show all posts
Showing posts with label VMware ESXi basic command. Show all posts

Sunday, June 19, 2011

VMware ESXi basic command reference

To find ESX software version and build:
# vmware -v
  VMware ESXi 4.1.0 build-348481
# vmware -l
  VMware ESXi 4.1.0 Update 1


To know the Hostname and IP Addess:
# hostname -s
   vmesxi-ht1
# hostname -i
  171.12.13.14


To find list of VMs running:
# vm-support -x
VMware ESX Support Script 1.33
Available worlds to debug:
wid=6342 hostlx03
wid=608998 cactty01


# vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
144 cactty01 [datastore1] cacllm01-d2_template/cacllm01-d2_template.vmx rhel5_64Guest vmx-07 Linux host with RHEL 5.6 64bit OS with JDK 1.6
48 hostlx03 [datastore1] htblsb03/htblsb03.vmx rhel5Guest vmx-07
#


To see the running processes
# esxtop


To get the list of services:
# chkconfig --list
DCUI on
TSM-SSH on
TSM on
.
[ Output truncated]
#


To check NIC properties:
# esxcfg-nics -l
Name PCI Driver Link Speed Duplex MAC Address MTU Description
vmnic0 0000:10:00.00 bnx2 Up 1000Mbps Full 5c:f3:fc:21:b5:e4 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-SX
vmnic1 0000:10:00.01 bnx2 Up 1000Mbps Full 5c:f3:fc:21:b5:e6 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-SX
vusb0 Pseudo cdc_ether Up 0Mbps Half 5e:f3:fc:23:b5:e7 1500 Unknown Unknown
#
# esxcfg-vmknic -l
Interface Port Group/DVPort IP Family IP Address Netmask Broadcast MAC Address MTU TSO MSS Enabled Type
vmk0 Management Network IPv4 10.20.21.160 255.255.255.0 10.20.21.255 5c:f3:fc:21:b5:e4 1500 65535 true STATIC


# esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 128 5 128 1500 vmnic0
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 4095 2 vmnic0
Management Network 0 1 vmnic0
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch2 128 3 128 1500 vmnic1
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 3 0 1 vmnic1
#


# vsish -e get net/pNics/vmnic0/properties
properties {
Driver Name:bnx2
Driver Version:2.0.7d-3vmw
Driver Firmware Version:5.2.3 NCSI 2.0.10
System Device Name:vmnic0
Module Interface Used By The Driver:vmklinux26
Device Hardware Cap Supported:: 0x3c032b -> VMNET_CAP_SG Device Software Cap Activated:: 0x800000 -> VMNET_CAP_RDONLY_INETHDRS
Interrupt Vector:0xff
Link Up:1
Speed (Mb/s):1000
Full Duplex:1
Uplink Port ID:0x01000002
.
[ Output truncated ]
 #
PS: As there are already several well-written article on this subject, I don't wanna put more effort on it. So here am recommending couple of links which am impressed with:
http://b2v.co.uk/b2vguide2vmware3.htm
http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/index.html