0% found this document useful (0 votes)
553 views19 pages

VMware VCAP-DCA Exam Command-Line Cheat Sheet v1.0

This document contains commands and examples for managing various aspects of a VMware ESXi environment such as storage, networking, users, logging, and vMotion. It includes commands for listing, configuring, adding, removing and managing items like VMDKs, VMs, VMkernels, vSwitches, HBAs, iSCSI targets and more.

Uploaded by

Predrag Terzic
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
553 views19 pages

VMware VCAP-DCA Exam Command-Line Cheat Sheet v1.0

This document contains commands and examples for managing various aspects of a VMware ESXi environment such as storage, networking, users, logging, and vMotion. It includes commands for listing, configuring, adding, removing and managing items like VMDKs, VMs, VMkernels, vSwitches, HBAs, iSCSI targets and more.

Uploaded by

Predrag Terzic
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

man ls

ls -l cd /vmfs/volumes

pwd

find /vmfs/volumes/ -iname "*delta.vmdk" find /vmfs/volumes/ -iname "*.vmsn"

nano /etc/ntp.conf

cat vmkernel.log

cat vmkernel.log | grep error cat vmkernel.log | grep error | more

more vmkernel.log tail -15 vmkernel.log

vihost vicfg-snmp vifs vicfg-user vicfg-cfgbackup vihostupdate vmkfstools esxcli vicfg-ipsec

vifp addserver servername addserver removeserver rotatepassword listservers vifp listservers Vifp removeserver servername

vifptarget -set esxi-02 vifptarget -clear

vicfg-hostops --operation enter vicfg-hostops --operation exit vicfg-hostops <conn_options> -operation reboot --force

vicfg-cfgbackup <conn_options> -s /tmp/ESX_181842_backup.txt vicfg-cfgbackup <conn_options> -l /tmp/ESX_181842_backup.txt vmkfstools c 10GB <path to VMDK> vmkfstools X 10g <path to VMDK> vmkfstools P <path to VMDK>

vifs -D [iSCSI-1]

vifs --move '[osdc-cx700-03] vcli_test/test_doc' '[osdc-cx700-03] winxpProsp2/test_doc

svmotion --interactive

vmware-cmd -l

vicfg-mpath -l vicfg-mpath --list-compact

vicfg-mpath --list-plugins esxcli <conn_options> nmp device setpolicy --device naa.xxx --psp VMW_PSP_RR

vicfg-vmknic -6 true vicfg-vmknic list vicfg-vmknic --add --ip 172.16.1.200 --netmask 255.255.255.0 -p "iSCSI-1" mtu 9000

vicfg-vswitch U <vmnic> <vSwitch> vicfg-vswitch L <vmnic> <vSwitch>

vicfg-vswitch B vSwitch0 vicfg-vswitch -a vSwitch0 vicfg-vswitch --mtu 9000 vSwitch0 vicfg-vswitch -add-pg iSCSI-1 vSwitch0 vicfg-vswitch -L vmnic5 vSwitch0

add-dvp-uplink | P

del-dvp-uplink | Q <adapter_name> dvp <DVPort_id><dvswitchname> dvp | -V vicfg-vswitch Q <vmnic> - V <dvport ID or vmnic> <dvswitch> vicfg-vswitch P <vmnic> - V <dvport ID or vmnic> <dvswitch>

vicfg-snmp server <hostname> username <username> password <password> -t target address>@<port>/<community>

vicfg-snmp server esxi-02 t vcenter/public vicfg-snmp server <hostname> username <username> password <password> enable vicfg-snmp server <hostname> username <username> password <password> -p <port> vicfg-volume l vicfg-volume r <previous VMFS label | UUID

esxcfg-volume M <previous VMFS label | UUID

vicfg-module <conn_options> -list

vicfg-module <conn_options> -set-options 'intr_type_2 rx_ring_num=8' s2io

vicfg-module <conn_options> -get-options s2io

esxtop b > file.csv esxtop c <config_file>

vm-support s d duration I interval esxtop R <path to dir> vscsistats L vscsistats S W id vscsistats P all W id vscsistats x esxcli nmp satp list esxcli nmp psp list
vicfg-scsidevs vmfs (list ID naa.)

esxcli nmp satp setdefaultpsp psp VMW_PSP_RR satp VMW_SATP_DEFAULT_AA esxcli nmp device setpolicy -device naa.xxx --psp VMW_PSP_RR esxcli server <host> -username root password <password> nmp device list

esxcli <conn_options> nmp roundrobin getconfig --device na.xxx

esxcli <conn_options> nmp roundrobin setconfig -type=iops --iops 4200 --device naa.xxx

esxcli nmp satp setdefaultpsp psp VMW_PSP_RR satp VMW_SATP_SYMM

esxcli swiscsi nic add -n vmk1 -d vmhba33 esxcli swiscsi nic add n <port_name> d <vmhba>

esxcli swiscsi nic list

vicfg-rescan vmhba33 esxcli vms vm list

esxcli vms vm kill --type <kill_type> --world-id <ID> vmware-umds.exe --set-config enable host 1 enable win 0 enable vmware-umds.exe --download

vmware-umds.exe --set-config path c:\download vmware-umds.exe E exportstore path vicfg-syslog -i

vicfg-syslog -s mysyslogserver

vicfg-syslog -p <port>

vilogger enable server testserver

vilogger enable vilogger disable

collectionperiod = 10 maxfilesize = 5MB numrotations = 5

vicfg-dns <conn_options --dns <dns1,dns2> vicfg-nics -l vicfg-nics <conn_options> -a vmnic2 vicfg-ntp --start vicfg-ntp -a 192.168.250.2 vicfg-route -a 192.168.100.0/24 192.168.0.1 Esxcfg-swiscsi e (enable iSCSI) -D --discovery -S --static -A -authentication -P --phba -T --target -L --lun -N --network (Independent hardware iSCSI only) -p --pnp (Independent hardware iSCSI only) -I --iscsiname -W --parameter -E --swiscsi -H --adapter Suboption is one of the following operations: -l --list

vicfg-iscsi --adapter list

vicfg-iscsi <conn_options> -static add --ip <ip_addr | domain_name> --name <iscsi_name> <adapter_name>

-a --add -r --remove

vicfg-nas l

vicfg-nas --add --nasserver dir42.eng.vmware.com -s /<mount_dir>nfsstore-dir42 vicfg-rescan vmhba1

vicfg-scsidevs -list

vicfg-scsidevs vmfs

vicfg-scsidevs -hbas

esxcfg-firewall -o 514,udp,out,syslog esxcfg-firewall c 514,udp,out,syslog esxcfg-firewall q incoming o esxcfg-firewall q outgoing esxcfg-firewall allowOutgoing -blockIncoming

esxcfg-firewall - allowIncoming allowOutgoing esxcfg-firewall - blockIncoming blockOutgoing vm-support vihostupdate <conn_options> -query vihostupdate.pl --server <IP address of ESXi 4 host> -i -b <name.zip>

vicfg-user -e user -o list

vicfg-user -e user -o add -l user27 -p 27_password

vicfg-user <conn_options> -e group -o add -d group40 -D 55

das.vmCpuMinMHz = <value>

das.usedefaultisolationaddre ss = false

das.failuredetectiontime = 60000

das.isolationaddress1 to das.isolationaddress10 = <value>

das.preferredPrimaries = 172.16.1.1, 172.16.1.2,172.16.1.3

Set-ExecutionPolicy remotesigned

connect-viserver vcenter01 disconnect-viserver vcenter01 Get-vm

Get-vm DC01 Get-command

Get-vm DC01| getmember Get-VM | where-object {$_.numcpu gt 1} Get-help *vmotion* Get-help get-VM Examples Get-powerCLIVersion

You might also like