vCSA and ESXi Console Cmds

vCSA 6.7/7.0 - service-control command:
service-control --list    
service-control --status
service-control --start servicename
service-control --stop servicename

service-control --stop --all
service-control --start --all

service-control --stop --all && service-control --start --all 

watch Service-control –status

How to find large files:

du -a /storage/log | sort -n -r | head -n 5

Show Replication Partners

/usr/lib/vmware-vmdir/bin/vdcrepadmin -f showpartners -h PSC_FQDN -u administrator 

Show Partner Status

/usr/lib/vmware-vmdir/bin/vdcrepadmin -f showpartnerstatus -h PSC_FQDN -u administrator

Networking:

/opt/vmware/share/vami/vami_config_net

To enter the shell in ESXi:
alt-F1 (to enter shell)

alt-F2 (to exit shell)

Shutdown/Reboot
reboot
poweroff

Show ESXi Version:
vmware -vl


Restarting the Management agents on an ESXi Server
/etc/init.d/hostd restart
/etc/init.d/vpxa restart


Restarting the Management agents on an ESX Server
service mgmt-vmware restart
service vmware-vpxa restart

Show Storage Adapters
esxcli storage core adapter list

Show Network Adapters:
esxcfg-nics -l

How to See the IP Connection List.
esxcli network ip connection list | grep 3260
Similar the windows command: Netstat -an | find "3260"

Forcing vmnic interface state up and down
esxcli network nic down -n vmnicX
esxcli network nic up -n vmnicX

How to find the driver version
esxcli software vib list |grep enic

esxcfg-* Commands
esxcfg-vswif
esxcfg-vswitch
esxcfg-nics
esxcfg-firewall
esxcfg-route

esxcfg-vmknic

esxcfg-vswitch Commands
To add a physical Nic to a vSwitch
esxcfg-vswitch -L vmnic8 vSwitch0
To remove a physical Nic from a vSwitch
esxcfg-vswitch -U vmnic8 vSwitch0

To view Software iSCSI Nic details
esxcli swiscsi nic list -d vmhba43

How to add/remove vmnics from a standard vSwitch
esxcli network vswitch standard uplink add -v vSwitch0 -u vmnic1
esxcli network vswitch standard uplink remove -v vSwitch0 -u vmnic1

 How to find running VMs:
esxcli vm process list

How to find registered VMs:
vim-cmd vmsvc/getallvms

List directory including details and hidden files:
ls -la

No comments:

Post a Comment