Sunday, March 12, 2017

VSphere 6 Upgrade Checklist

Backups & Snapshots Not Started  Make sure all required passwords are available. Make sure you can access critical VMs without vCenter Server services (find and log into hosts directly)
Verify Prerequisites Not Started  Verify OS / .NET / DB requirements are met

vCenter Server for Windows Requirements

http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.vsphere.install.doc%2FGUID-F072712B-F568-4C3A-A4BC-EE6856D50CDA.html

Before Upgrading vCenter Server
http://pubs.vmware.com/vsphere-60/topic/com.vmware.vsphere.upgrade.doc/GUID-B90D873C-6C97-4C09-886A-0ACCE4A4034C.html
User Permissions Check Not Started  Verify user performing install has adequate rights
SSO Topology Review Not Started  Position the SSO / VC topology to one that's supported and meets your needs
Inventory Service Database Check Not Started  Make sure the vCenter Server Inventory Service database is not massive. Optional, reset the Inventory Service database. Note that during the re-build it will take some time (potentially hours)
Cleanup Orphaned Data Not Started  Run the “cleanup_orphaned_data_MSSQL.sql” script and once complete, check for null entries in the VPX_STAT_COUNTER table. Delete these entries if they exist.

    Optional: truncate historical task and event data
        alter table VPX_EVENT_ARG drop constraint FK_VPX_EVENT_ARG_REF_EVENT, FK_VPX_EVENT_ARG_REF_ENTITY alter table VPX_ENTITY_LAST_EVENT drop constraint FK_VPX_LAST_EVENT_EVENT
        truncate table VPX_TASK
        truncate table VPX_ENTITY_LAST_EVENT
        truncate table VPX_EVENT
        truncate table VPX_EVENT_ARG
        alter table VPX_EVENT_ARG add
        constraint FK_VPX_EVENT_ARG_REF_EVENT foreign key(EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade, constraint FK_VPX_EVENT_ARG_REF_ENTITY foreign key (OBJ_TYPE) references VPX_OBJECT_TYPE (ID)
        alter table VPX_ENTITY_LAST_EVENT add
        constraint FK_VPX_LAST_EVENT_EVENT foreign key(LAST_EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade
vCenter Server Services Check Not Started  Make sure you can successfully stop and start vCenter Server services and log into vCenter Server with “administrator@vSphere.local” as a minimum.
UAC Check Not Started  Make sure UAC (User Account Control) is completely disabled. The server may need to restart for this to fully take effect.
SQL Check Not Started  If you’re using Windows Authentication for the vCenter Server database, make sure the account you’re logged in with has SQL Server rights, and is the account you want to use when configuring the DSN.
Local Admin Account Check Not Started  Make sure the user account you’re logged in with during the install is a member of the local administrators group.
Certificates check Not Started  checked sso cert.
Stop WinHTTP Not Started  Stop and disable this service : WinHTTP Web Proxy Auto-Discovery Service
Cleanup Temp Data Not Started  Clean-up the system %temp% directory.

  a. RDP / Console to vCenter Server VM
  b. Open Windows explorer and navigate to %temp%
  c. This should bring you to C:\Users\\AppData\Local\Temp\ OR C:\Users\\AppData\Local\Temp\<#>\
    i. If you are brought to …\temp\
      1. Create a new directory called “backup” in the current directory and try to move all files into said “backup” directory. Sometimes certain files will be locked. This is OK, and these can be ignored. You are done.
    ii. If you are brought to …\temp\<#>\
      1. Create a new directory called “backup” in the current directory and try to move all files into said “backup” directory. Sometimes certain files will be locked. This is OK, and these can be ignored.
      2. Move up a directory so that you are in …\temp\ and repeat the above process, excluding the previous directory from the move. (If you were placed into …\temp\2\ you will want to leave the …\temp\2\ path since this is a system variable used by Microsoft. From my observations, the …\temp\#\ directory appears to be created when you remote desktop (RDP) into a Windows OS)
Installation Initiation Not Started  Mount the vCenter Server 6.0.x ISO and run the “autorun.exe” as an administrator (Right click > run as administrator). Please do this EVEN THOUGH the account is a member of the local administrator group.

  vCenter Server 6.0 installation Best Practices
    http://kb.vmware.com/kb/2107948

Thursday, December 18, 2014

Interview questions in VMware Server


Q1: what is the default invocation period for DRS. Can we change this. If yes
then how?
Ans: The default invocation period is 300 seconds (5 minutes). But this can be changed
via the configuration file vpxd.cfg. We have to change the value of as
shown below:
300
Just change the value 300 to a custom value defined by you. The range of supported value is 60 secs to 3600 secs.


Just change the value 300 to a custom value defined by you. The range of supported
value is 60 secs to 3600 secs.

Q2: What is the role of VPXA in DRS?
Ans: VPXA is the vCenter agent that runs inside Esxi hosts and it enables a 2 way
communication between Esxi hosts and vCenter Server. VPXA is responsible for:
1) Keeping the status of Esxi and VM’s in sync
2) It sends info to vCenter server when a VM’s power state is changed or a VM is
vMotioned from one host to other.Alex_Hunt DRS Interview Questions
DRS uses this information which is presented by Esxi hosts to vCenter server for
calculating the load balance and proposed migrations in case of cluster imbalance.

Q3: Will DRS work if vCenter server is down? If no then explain why DRS is
dependent on vCenter server.
Ans: No DRS will not work if vCenter Server is down.
DRS depends upon vCenter server for information like current power state of virtual
machines, change in power state of any VM, number of datastores to which Esxi hosts
are connected and the memory and cpu configurations of a VM.
DRS will use all these information while calculating the load on the cluster and
proposing migration recommendations when a cluster needs to be balanced.

Q4: How DRS calculates there are imbalances in cluster? What are the
things that DRS takes into account for determining this?
Ans: To calculate the cluster imbalance, DRS compares the Current Hosts Load
Standard Deviation (CHLSD) to Target Hosts Load Standard Deviation (THLSD) and if
CHLSD < THLSD
Cluster is considered as imbalanced.
CHLSD Calculation
DRS computes Normalized Entitlement (NE) of each Esxi hosts and the standard
deviation associated with it. NE is nothing but calculation of how much resources are
currently utilized out of total resources. NE is calculated by summing up dynamic
entitlements (usage) of all VM’s that are running on an Esxi host and diving this by Esxi
host capacity.
So, NE= Dynamic Usage of all VM’s / Total host capacityAlex_Hunt DRS Interview Questions
THLSD Calculation
THLSD is derived from DRS migration threshold which is defined at the time of
configuring DRS. Each threshold level sets different imbalance tolerance margin. The
aggressive threshold sets a tight margin allowing for little imbalance, while conservative
thresholds tolerates bigger imbalances.

Q6: What is DRS cost-benefit-risk approach?
Ans: DRS uses a cost benefit risk approach to load balance a cluster. Before presenting
the migration recommendations for a VM to load balance a cluster, DRS calculates 3
things:

1) Cost: What will be the cost of migrating a VM from source to destination host? Cost
here refers to the CPU and memory.
When a vMotion process in invoked on a VM, it reserves 30% of the cpu core (For 1 GB
NIC) of that VM and 100% cpu core (For 10 GB NIC). This reservation is created on both
source and destination host. This reserves resources can’t be allocated to any other VM
while vMotion is in progress. This can put some pressure on an Esxi host when it is
heavily loaded.

2) Benefits: What will be the resource benefit that an Esxi host will get after migrating a
virtual machine to other Esxi ho st. If after the migration CHLSD value of the Esxi
host comes down then DRS will consider that migration as benefit.

3) Risk: Risk accounts for possibility of irregular loads. Suppose a VM has inconsistent
and spiky demands of resources, then migrating such VM’s is not a good move
because may be at the time of migration VM resource demand was low but after
completion of migration, VM’s resource demands suddenly increased. In this case it Alex_Hunt DRS Interview Questions
can cause the increase in destination Esxi hosts CHLSD and again DRS has to
perform migration of that VM to bring down CHLSD of the Esxi host where that VM
was migrated.

Note: DRS recommends migrations if Benefit obtained due to a migration < cost
associated with that migration.

Q8: What are the factors that affect DRS recommendations?
Ans: Following are the factors which affect the DRS recommendations:
1- VM size and Initial Placement: When a new VM is created or a VM is powered on,
DRS selects a host where this VM should be initially placed. DRS prefers the registered
host as long as placement of that VM on this host will not cause cluster imbalance.
During placement of such VM’s DRS uses a worst case scenario because it doesn’t have
historical data for that VM. DRS assumes both CPU and memory demand of this VM is
equal to its configured size.
Oversized VM’s can temporarily cause cluster imbalance and can cause unnecessary
migrations of active VM’s.
2- PollPeriodSec (Length of DRS Invocation): The default value of PollPeriodSec
is 300 seconds. Range of PollPeriodSec is 60 sec to 3600 sec. shortening this period will
cause increase in vCenter overhead as cluster imbalance will be calculated frequently.
Increasing this value decreases the frequency of cluster balance calculation and can leave
your cluster imbalanced for longer period of times but allows for larger number of
vMotions due to long invocation interval.
3- Simultaneous vMotion: vSphere 5.1 allows 8 concurrent vMotions on a single host
with 10GbE capabilities. For 1GbE, 4 concurrent vMotion can takes place. Also multiNIC
vMotion is supported in vSphere 5.1 so multiple active NICs and their combined Alex_Hunt DRS Interview Questions
bandwidth can be used for migration of a VM. In such environment VM’s will be
migrated quickly and cluster can be balanced in less time.
4- Estimated Total Migration Time: The migration time depends on variables like
source and destination host load, active memory usage of VM, link speed and available
bandwidth+ latency of the physical network used by vMotion Portgroup.

Q9: what are the use cases for VM-VM affinity rules and VM-VM anti affinity
rules?
Ans: VM-VM affinity: This is useful when you require that 2 of your VM’s should
always run together on an Esxi host. For E.g. Keeping front-end and back-end server of
an application on same ESXi host to reduce network latency between the 2 VM’s.
Another use case will be running together same types of VM’s which are having same
type of applications so as to get max benefits of transparent page sharing (TPS)
VM-VM anti-affinity: This is useful when you don’t want that 2 of your VM should
run together. Keeping servers providing same kind of services on different host will
provide resiliency
For e.g. You will not want your DC and ADC run together on same Esxi host because if
that Esxi host goes down it can severely impact your environment as both DC and ADC
server has gone down together.
Another use case will be running web-server farms or clustered DB-servers in a
virtualized environment.
Also, keeping away 2 VM’s from each other which are very resource intensive to stop
them from monopolizing resource usage.

Q10: What are the use cases of VM-Host affinity rules and VM-Host antiaffinity
rules?Alex_Hunt DRS Interview Questions
Ans: VM-Host affinity: This is useful when you want that your VM should run on a
particular Esxi host only.
For e.g. running and oracle DB server which has socket based license. If your
environment is having heterogeneous hosts than migrating such VM to a host which has
different CPU configuration can violates your license and can cause trouble.
VM-Host anti affinity: This is useful when you want that a particular VM should not
run on some particular Esxi hosts. For e.g. your environment has heterogeneous hosts
and all the hosts don’t have Numa architecture and you want to get benefits of the
vNuma inside your VM. In this case you would want your VM to run only on those
servers which supports Numa.

Q11: Can DRS override “preferential or should rules”. If yes then how and if
no then why?
Ans: Yes DRS can override should rules. When rules are configured inside DRS then
DRS creates a rule list and provide migrations recommendations in accordance with the
rules defined in rule list. But if the cluster imbalance cannot be solved even after running
these migrations then DRS drops the rule list and re-run the load balance algorithm and
those migrations also which can break the should rules, in order to load balance a cluster
in a better way.

Q12: CAN HA, DRS and DPM override “must or mandatory rules”?
Ans: No HA, DRS and DPM can’t override must rules.

Q13: What impact does must rule places on DRS, HA and DPM operations?
Ans: If a migration will cause violation of must rule then that migration will be cancelled
by DRS.Alex_Hunt DRS Interview Questions
IF DPM is trying to put a host in sleep mode for power saving but migration of VM’s
running on this host can cause a must rule violation, it will prevent DPM to put that host
in sleep mode.
If HA is trying to restart VM’s after a host failure but if restart of some VM’s on a
particular host can cause must rule violation then HA will either restart those VM’s on
some different host or could not restart them at all if no suitable host is available for
failover.

Q14: If we have configured some rules (affinity or anti-affinity) in DRS the
will those rules work if we disable DRS on a cluster?
Ans: Yes rules will be in affect even if we disable DRS without deleting the rules first.

Q15: If on a VM, VM-Host affinity should rule is configured then can we
migrate that VM on an Esxi host that is not part of the DRS cluster?
Ans: No a VM can’t be migrated to an Esxi host that is not part of the DRS cluster.

Q16: What are the best practices for disabling DRS?
Ans: Before disabling DRS it is recommended to delete all affinity and anti-affinity rules
and then proceed. Because if rules are not deleted and DRS is disabled, rules will be still
in affect and can affect cluster operations.

Q17: What are the limitation that are put by DRS mandatory or must rules
on a cluster?
Ans: If a mandatory rule is configured on a cluster then it can put following limitations:
1) Limit DRS to select hosts for load balancing
2) Limit HA to select host for failover
3) Limit DPM to select host to power offAlex_Hunt DRS Interview Questions
4) It can affect ability of DRS to defragment the cluster resources. At the time of failover
HA can seeks assistance for DRS and can ask to defragment resources if a single host
is not able to provide adequate resources for failover.

Q18: If a new DRS rule is created but that rule is conflicting with any
existing rule then which rule DRS will respect, old rule or new rule while
performing DRS actions?
Ans: If a new rule is conflicting with an old rule then new rule will be disabled
automatically. DRS will prefer respecting the old rule.

Q19: How many automation levels are there for a VM in respect to DRS? Can
VM automation level override cluster automation level?
Ans: VM automation level can override cluster automation level. From a VM
prospective there are 5 automation levels. These are:
1) Fully Automated: Load balance and Initial placement will be done by DRS
automatically
2) Partially Automated: Load balance of the VM will be done manually but initial
placement will be done automatically
3) Manual: VM migration as part of Load balancing and initial placement will be
both manual. DRS will only generate recommendation for that VM and
administrator has to manually approve this recommendation.
4) Default: VM will inherit the DRS automation level as defined at the cluster level.
5) Disabled: DRS will not perform any actions on that VM.

Monday, September 01, 2014

Nic Driver update process in ESX Server

SSH into the respective host
1 ) Run the following command to list all the network interfaces.
esxcfg-nics –l

Run the following commands to get currently installed network drivers and firmware versions. ethtool –I vmnic0 ethtool –i vmnic3

Run the following command to get VID,DID and SVID of the nics.
vmkchdev -l | grep “vmnic”

Go to VMware Compatibility Guide and select I/O devices in what you are looking for. Enter VID, DID and SVID to get all the driver versions for the nic.

Unzip the file and extract the VIB file.

Copy the file to /var/log/vmware/ on the host and run the following command.
esxcli software vib update –v {VIBFILE}

ESX RAM DISK FULL Errors

Please follow the below steps for RAM Disk Full Error, This issue may occur effect for migration of Vm 's from one Host to another Host .
1. Connect to the ESXi host using SSH. For more information, see .
2. Check if SNMP is creating too many .trp files in the /var/spool/snmp directory on the ESXi host by running the command:
ls /var/spool/snmp | wc -l
Note: If the output indicates that the value is 2000 or more, this may be causing the full inodes.
3. Delete the .trp files in the /var/spool/snmp/ directory by running the commands: # cd /var/spool/snmp # for i in $(ls | grep trp); do rm -f $i;done
4. Change directory to /etc/vmware/ and back up the snmp.xml file by running the commands:
# cd /etc/vmware # mv snmp.xml snmp.xml.bkup
5. Create a new file named snmp.xml and open it using a text editor. For more information, see .
6. Copy and paste these contents to the file: false161 indicationsinfo
7. Save and close the file.
8. Reconfigure SNMP on the affected host by running the command: # esxcli system snmp set –-enable=true
9. To confirm the SNMP services are running normally again, run the command: # esxcli system snmp get Here is an example of the output: /etc/vmware # esxcli system snmp get Authentication: Communities: Enable: true Engineid: 00000063000000a10a0121cf Hwsrc: indications Loglevel: info Notraps: Port: 161 Privacy: Remoteusers: Syscontact: Syslocation: Targets: Users: V3targets: To ensure that the issue does not recur, you can temporarily disable snmpd to stop logging. To stop the snmpd service, run this command: # /etc/init.d/snmpd stop Note: In the event that the host has run out of inodes, attempt to stop vpxa on the host to free up an inode:
1. Connect to the host with the vSphere Client.
2. Click Configuration > Security Profile.
3. Under Services, click Properties.
4. Click vpxa, then click Options.
5. Under Startup Policy, click Stop.
6. Click OK.
7. Click OK.

Tuesday, November 20, 2012

Core Hardware Options for ESX / ESXi Server


$vmkvsitools hwinfo -i
So, what else “vmkvsitools” can do?. Although, I haven’t finished yet exploring all the parameters, you can try some of the commands as I listed below :-

Usage: ‘vmkvsitools CMD option’

CMD: amldump, bootOption, hwclock, hwinfo, lsof, lspci, pci-info, pidof, ps, vdf, vdu, vmksystemswap, vmware
eg1. “$vmkvsitools CMD -h” -> get help
eg2. “$vmkvsitools hwinfo -p” -> print all pci device info present
eg3. “$vmkvsitools hwinfo -h” -> Print usage
eg4. “$vmkvsitools lspci -p” -> print details of pci device
eg5. “$vmkvsitools vmware -v” vmkernel version
eg6. “$vmkvsitools vmware -l” Print release level
eg7. “vmkvsitools hwclock -d 10/07/2010 -t 00:33:00″ Set date & time
eg6. “vmkvsitools ps -c” Print process ID (PID) with verbose command aka ps auxwww


Well, just give a try because too much to explain here. Remember “$vmkvsitools CMD -h” for help.


How to connect the below window from command line ?




~#cd /usr/sbin...............>

/sbin # dcui/
What is amldump?

~ # amldump

Writing file DSDT.aml

Writing file FACS.aml

Writing file FACP.aml

Writing file SSDT.aml

Writing file MSDM.aml

Writing file HPET.aml

Writing file MCFG.aml

Writing file TAMG.aml

Writing file APIC.aml

~ #

Regulary which is used for ESX/ESXI Server in Core level for background process of Operating system
techsupport.sh
vmkdump_extract
amldump
ntpd
vmkerrcodeapply-host-profiles
vmkeventd
applyHostProfile
vmkfstools
esxtop 
vmkiscsi-tool
auto-backup.sh
esxupdate
partedUtil 
vmkiscsid
backup.sh
ethtool
pidof
chkconfig
firmwareConfig.sh
vmkmkdev
dcbd
ft-stats
randomSeed
vmkperfdcui
generate-certificates 
vmkramdisk
df 
hbrfilterctl
scantools
vmksystemswap
dmesg
sensord
vmtar
doat
hwclock
vmware-autostart.shhwinfo 
sfcbd
vmware-usbarbitratorshutdown.sh 
esxcfg-dumppart 
smbiosDump
vscsiStatsesxcfg-fcoe watchdog.sh
logchannellogger
storageRM
lspci 
tmpwatch.py
lsusb
traceroute
uptime
memstats 
vm-support
net-dvs
vmdumper
net-fence
vmfs-support
net-lbt
vmkbacktrace
netlogond
vmkchdev
Session.py 
vmkdevmgr
ntp-keygen 
localcli 
statedumper
vmkload_mod
bootOption
fdisk 
vmkmicrocode

acm bottom ad