esxcli --help
vifp --help
vifptarget --help
sudo domain join cli join vclass.local
sudo domainjoin cli leave
sudo domainjoin cli query
sudo passwd vi-user
vifp addserver esxi01.vclass.local --authpolicy fpauth --username root
vifp removeserver esxi01.vclass.local --authpolicy fpauth --username root
vifp addserver esxi01.class.local --authpolicy fpath
vifptarget -s (set)
vifptarget -c (Back)
vicfg-ntp --list
vicfg-ntp --add dc01
vmkfstool -i /vmfs/volumes/lun01/001.vmdk /vmfs/volumes/lun02/001.vmdk
vicfg-snmp -s
vicfg-snmp -t 172.168.199.5@162/Public
vicfg-snmp -E (To enable SNMP)
vicfg-snmp -T(Test it)
vicfg-snmp -p 160 (Configure snmp for pooling)
/etc/vmware/ssl
Backup rui.key(keyfile), rui.crt(certificate file)
To Generate new certication:-
/sbin/generate-certificates
Restart the host after installing new certificates
C:\Program Data\VMware\Vmware Virtual Center\SSL
SSL Timeout Value:
vmkfstools -P /vmfs/volumes/Silver (Get Info)
vmkfstools -c 10m -d thin "/vmfs/volumes/Silver" Pranay.vmdk (Create Disk)
vscsiStats -l (get world ID)
vscsiStats -s -w 1290 (Enable collection)
vscsiStats -p latency (Histographical Data)
vscsiStats -x (Stop vscsiStats Collection)
vscsiStats -p latency -c (Generate comma delimited output)
vscsiStats -p seekDistance (Histogram)
Failed to create virtual disk: Operation not permitted
Could not reach isolation address: non specified (1028295)
Cannot synchronize host "host name" Operation timed out.
VscsiStats: No valid stats for worldgroup 7825, handle 8192. Please enable vscsiStats collection
no vmkcore disk partition is available and no netowrk coredump server has been configured. HOst core dumps cannot be saved.
esxcfg-scsidevs -m
esxcfg-mpath -L | grep F405E46494C4542517079784C413D2455697B6D2C6568305
esxcli storage core claimrule list
esxcli storage core claimrule add -r 501 -t location -C 0 -T 0 -L 2 -P MASK_PATH
esxcli storage core claimrule add -r 502 -t location -C 0 -T 5 -L 3 -P MASK_PATH
esxcli storage core claimrule list
esxcli storage core claimrule load
esxcli storage core claiming reclaim -d t10.F405E46494C4542517079784C413D2455697B6D2C6568305
esxcfg-mpath -L | grep F405E46494C4542517079784C413D2455697B6D2C6568305
esxcli storage core claimrule remove -r 501
esxcli storage core claimrule remove -r 502
esxcli storage core claimrule list
esxcli storage core claimrule load
esxcli storage core claimrule list
esxcli storage core claiming unclaim -t location -C 0 -T 0 -L 2
esxcli storage core claiming unclaim -t location -C 0 -T 5 -L 3
esxcli storage core claimrule load
esxcli storage core claimrule list
Unzip ESXi Offline Bundle in C:\ESX-Depot
Add-ESXSoftwareDepot C:\ESX-Depot
Get-ESXImageProfile
New-ESXImageProfile -CloneProfile ESXi-Standard -name VCAP-Profile
Get-ESXImageProfile
Get-ESXSoftwarePackage
Add-ESXSoftwareDepot Z:\qLogic\Offlinebundle.zip
Add-ESXSoftwarePackage -ImageProfile VCAP-Profile -SoftwarePackage net-qlge
Get-ESXImageProfile VCAP-Profile | Select -ExpandProperty VIBLIST
Remove-ESXSoftwarePackage -ImageProfile VCAP-Profile -SoftwarePackage net-qlge
Export-ESXImageProfile - ImageProfile VCAP-Profile -ExportToISO C:\VCAP_ESXi.iso
Export-ESXImageProfile - ImageProfile VCAP-Profile -ExportToBundle C:\VCAP_ESXi.zip
=================
Reserve MAC address of host in DHCP Server
Configure option for 066 and 067 in DHCP reservation.
066 Boot Server: VC IP Address
067 Bootfile Name: undionly.kpxe.vmhardwired
============================
Configure TFTP.
Add ESXi Image Depot:-
Add-ESXSoftwareDepot C:\ESX-Depot
Get-ESXImageProfile
New-ESXImageProfile -CloneProfile ESXi-Standard -name VCAP-Profile
connect-viserver vc03 (Bcoz it talks to Autodeploy Server
New-DeployRule -Name Image_Rule -Item VCAP-Profile -Pattern "ipv4=172.20.10.152-172.20.10.200"
or
New-DeployRule -Name ContainerRule -Item VCAP-Profile -Pattern -allhosts
Add-DeployRule Image_Rule
Get-Cluster (2 Clusters Available: AutoDeploy & Cybertron)
New-DeployRule -Name Cluster_Rule -Item AutoDeploy -Pattern "ipv4=172.20.10.152-172.20.10.200"
or
New-DeployRule -Name Cluster_Rule -Item AutoDeploy -allhost
Add-DeployRule Cluster_Rule
Get-VMHostProfile (Result: LabHostProfile, VCAP-Demo-Lab)
New-DeployRule -Name Assign_Profile -Item LabHostProfile -Pattern "ipv4=172.20.10.152-172.20.10.200"
Add-DeployRule Assign_Profile
Set-DeployRuleSet -Deploy -NoActivate (To disable deploy rule)
New-DeployRule -Name ContainerRule -Item Auto-Deploy-Hosts -allhosts
Get-LicenseDataManager | Get-Datacenter -Name VCAP-Lab
New-DeployRule -Name ImageRule -Item ESXi-5.1.0-799733-standard -allhosts
Get-DeployRule
New-DeployRule -Name ProfileRule -Item "Host Profile - ESXi02" -allhosts
Set-DeployRule ImageRule -Pattern "ipv4=172.20.10.152-172.20.10.200"
New-DeployRule -Name ContainerRule -Item Auto-Deploy-Hosts -allhosts
Get-DeployRule
Get-DeployRuleSet
=================
Get-DeployRuleSet (Get the current ruleset that we just loaded)
Set-DeployRuleSet (Allow to set the list of rules in the ruleset)
Set-DeployRule (Update and existing rule)
Get-VMHostMachineRules (Check to see which rules match on a given host)
Repair-DeployImageCache (Use to rebuild the auto deploy)
----
Get-AutoDeployRule
Add-DeployRule
Apply-ESXImageProfile
Copy-DeployRule
Get-DeployOption
Get-DeployRule
Get-DeployRuleSet
Get-VMHostAttributes
Get-VMHostImageProfile
Get-VMHostMatchingRules
New-DeployRule
Remove-DeployRule
Repair-DeployImageCache
Repair-DeployRuleSetCompliance
Set-DeployOption
Set-DeployRule
Set-DeployRuleSet
Switch-ActiveDeployRuleSet
Test-DeployRuleSetCompliance
==================================
esxcli storage nmp device list
Newly aded iSCSI datastores claimed by the detault AA SATP will get the RR PSP:-
esxcli storage nmp satp set -s VMW_SATP_DEFAULT_AA -P VMW_PSP_RR
Change SATP to existing device:-
esxcli storage nmp device set -d t10.F405E46494C45425557527C444E4D21386A7F6D255D46423 -E
Set IOPS to 1:-
esxcli storage nmp psp roundrobin deviceconfig get -d naa.xxxxx
esxcli storage nmp psp roundrobin deviceconfig set -d naa.xxxxx -t iops -I 1
Search in pdf vpxd.filter
config.vpxd.filter.vmfsFilter
config.vpxd.filter.rdmFilter
config.vpxd.filter.SameHostAndTransportFilter
config.vpxd.filter.hostRescanFIlter
Enable firewall for syslog from Configuration>>Security Profile>>Firewall>>Syslog
enter Syslog server name in advance settings
#esxcli system syslog reload
#esxcli system syslog config set --loghost=10.10.10.10 (or tcp://10.10.10.10:514 or udp://10.10.10.10:514)
#esxcli system syslog reload
#esxcli network firewall ruleset set -r syslog -e true
#esxcli network filewall refresh
esxcli network vswitch standard set -v vswitch4 -c advertise
esxcli network vswitch standard set- v vswitch4 -c both
esxcli network vswitch standard set -v vswitch4 -c Listen
For configuring CDP & LLDP on vDS, use GUI:-
dVS>>>Properties>>>Advance>>>Discovery Protocol
das.slotCpuInMhz , value 32 MHz by default
das.slotMemInMB, 20 MB by default
Other advance settings:-
das.heartbeatDsPerHost (Default is 2, however max override can be 5)
das.vmMemoryMinMb (Use for memory slot size if no reservation is present, default of 0)
das.slotMemInMb (Upper value of a memory slot size,)
das.vmCpuMinMhz (Use for CPU slot size if no reservation is present, default of 32)
das.slotCpuInMhz
da.isolationAddress
das.isolationAddressX
das.useDefaultIsolationAddress
SSH Time out:-
Uservars->ESXiShellTimeOut
UsersVars.ESXiShellTImeOut
Home>>>Administration>>vCenter Server Setting>>>SSL>>Check/Uncheck box
# cd /etc/vmware/ssl
#ls -ltr
#cp rui.crt rui_backup.crt(Backup of existing certificate)
#cp rui.key rui_backup.key(Backup of existing certificate)
#generate-certificates
#/etc/init.d/hostd restart (Restart mgmt agent)
≠ To deploy ssl vertificate:-
≠ SImple copy *crt and *.key in same directory "/etc/vmware/ssl"
≠ Rename it as rui.key and rui.crt
≠ restart mgmt agent.
vi /etc/vmware/hostd/config.xml
Add timeout value:-
<readTimeoutMs>15000<readTimeoutMs>
<handshakeTimeoutMs>15000<handshakeTimeoutMs>
<readTimeoutMs>15000<readTimeoutMs>
<handshakeTimeoutMs>15000<handshakeTimeoutMs>
vi /etc/pam.d/passwd
password requisite /lib/security/$ISA/pam_passwdqc.so retry=3 min=8,8,8,7,6
Search "PAM" in security guide.
password requisite /lib/security/$ISA/pam_passwdqc.so retry=N min=N0, N1, N2, N3, N4
N = Retry,
N0=length of password
N1=Length if using two character classes
N2=Length of word inside passphrase
N3=Length if using three character classes
N4=Length if using four character classes
=========================
esxcli storage core device vaai status get
Heap Size:
Host>>>Advance Setting>>>Net>>>Net.TcpipHeapSize
Max NFS Volumes:
Host>>>Advance Setting>>>NFS>>>NFS.MaxVolumes
# esxcli storage vmfs snapshot list
# esxcli storage vmfs snapshot mount -l "replicated_lun"
# esxcli storage vmfs snapshot resignature -l "replicated_lun"
to save Custom esxtop...edit by F...save by W...path /tmp/pranay
to use...esxtop -c /tmp/pranay
vm-support -p -i 10 -d 60
https://172.20.10.17/vod/index.html
https://172.20.10.41/host
esxcli system syslog config logger list
esxcli system syslog config set
esxcli system syslog config set
esxcli system syslog config set --default-rotate=16
Powershell:-
cd power
cd vmstore:
dir (List datastores)
Get-VM -Location ResourcePool01 | Set-VM -MemoryGB2 -NumCPU 2
df -h
vdf
SSD Tagging:- Device will show as SSD if even the are Non-SSD
esxcfg-scsidevs -m
esxcli storage nmp device list
esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -d naa.xxxx -o enable_ssd
esxcli storage core claiming unclaim -t device -d naa.xxx
esxcli storage core claimrule load esxcli storage core claimrule run
# esxcli storage vmfs snapshot list
# esxcli storage vmfs snapshot mount -l "replicated_lun"
# esxcli storage vmfs snapshot resignature -l "replicated_lun"