1…Daily Activities
2…If Esx host is down , what u will do
Esx Host Not Responding Error
1…Ping the ip of the esxi host. It will ping…
2…Login using putty & use this command
# service mgmt-vmware restart (Restart the mgmt-vmware service )
3…If still problem …then kill the process
# ps -ef | grep hostd
This will output a list of processes .
root 23955 1 0 10:42 pts/1 [Link] /bin/sh /usr/bin/vmware-watchdog -s hostd
–u 60 -q 5 -c /usr/sbin/vmware-hostd-support /usr/sbin/vmware-hostd -u
root 23961 23955 4 10:42 ? [Link] /usr/lib/vmware/hostd/vmware-hostd
The first process is using the vmware-watchdog,
The second line is using hostd . kill the process.
virtual machines will run so don’t worry about that.
# kill -9 23961
Now the hostd service will start and after a few seconds
Host and virtual machines will be up in vCenter.
4…If you cant kill or restart services.. then reboot the esxi host ..
If esxi hosts Disconnected Error.
1… Right click the esxi host Reconnect.
2….If not connecting… ping the ip add of host & vcenter.
3.… Open Putty … enter these commands
service mgmt-vmware restart (restarts host agent (hostd) on vmware esx server)
service vmware-vpxa restart (restarts Vcenter agent service)
service network restart (restarts management networks on ESX)
4…Remove the ESX/ESXi host from the vCenter Inventory.
Add the ESX/ESXi host back to vCenter Inventory.
Restart the ESXi Management Agents resolves the issue.
3…If Vcenter is down, what will happen, How will you Troubleshoot
1…If vCenter is down, hosts and virtual machines are not affected
2…HA, FT will work
3…DRS do not work
How HA works
HA will work, because HA agent running on each host, and the hosts monitor each other
and keep lists of running VMs that has to be restarted in case of a host failure. vCenter is
just used to configure HA and De-activate.
Why DRS Do not work
DRS will NOT work without vCenter, because vMotion recommendations are computed
by the vCenter service, and it also initiates the migration processes
How will you Troubleshoot
# Go to services Restart VMware VirtualCenter Server service
# If not starting Restart the SQL Server service Restart VirtualCenter Server service
# Verify SQL server database connectivity. (check ODBC Connection test)
# Verify SQL server space, clear old unwanted logs and create space.
# Defragment Database if the database is heavily fragmented, vCenter Server may not start.
# Verify the VMware VirtualCenter Service is running with proper login & pwd.
# Verify that critical folders exist on the vCenter Server host.
Note: In Windows 2008 (64-bit), these folders are located at:
C:\ProgramData\VMware\VMware VirtualCenter\sysprep
C:\ProgramData\VMware\VMware VirtualCenter\docRoot\diagnostics
# Verify that no hardware or software changes made to the vCenter server that created the
problem. If any changes made recently uninstall those H/W or S/W
# Stop IIS service in the vcenter server, then restart vcenter service.
# vCenter logs is vpxd logs will help.
Windows 2008 located at C:\ProgramData\VMware\VMware VirtualCenter\Logs
4…Unable to Power On a VM ..what will u do
# Problem with storage
# Not enough RAM or CPU to power on the vm
# Problem with corrupted vmx file, VM files not accessable.
# Swap file locked by another process
5…Unable to Power Off a VM ..what will u do
# Check the running processes .. and Kill
First find the Id ..to Get a list of running vms, to find World ID, UUID, Display Name
the command is
esxcli vm process list
esxcli vm process kill –t soft -w WorldID
esxcli vm process kill –type=[soft,hard,force] –world-id=WorldNumber
soft – Normal shut down .
hard – it will shut down the OS before properly closing applications.
force - it will force the VM to switch off just like pushing a power switch
6…Snapshot or Clone ..which is better to keep for one month. Why ?
Clone should be used. Bcos it will give good performance if we are going to use for long
time.
Snapshot should not be used for more than 3 or 4 days. It will affect the performance.
7…IF u delete a snapshot what will happen
When you delete all snapshots for a VM, all of the delta files are merged back into the
original VMDK file.
If you delete an individual snapshot, that snapshot is merged into its parent snapshot.
if Snapshot Deletion fails or delta disk is not committed back to its parent disk
we have to use Snapshot Consolidation method.
To consolidate the snapshot files
right-click the virtual machine Snapshot Consolidate.
Check the Need Consolidation column to check the task succeeded or not.
Right-click the menu bar of that vm column Needs Consolidation
A Yes status means vms should be consolidated.
A No status indicates that the files are OK.
8…If u create a snapshot what will happen.
When you create a snapshot, the [Link] file becomes read-only.
And create a new “[Link]” file in its name.
It starts writing into this delta file, and will not touch the original .vmdk file
(which represents a virtual machine’s hard drive)
Initial Snapshot File size is 16MB
Snapshot files : [Link] , [Link], [Link]
9…How will keep 2 vms in a particular host.
Create Affinity Rules..using DRS Groups Manager
(check my “ all others “ Document)
10…Patching Process. If there is a problem after patching ..what u will do.
Use Update Manager for Patching
Command for Patching
esxcli software vid install -d: This command will install a specified file
esxcli software vid install -d /vmfs/volumes/datastore/patches/[Link].
esxcli software vid list: list of all patches & updates installed on the EtSX/ESXi host
If there is a problem after patching ..what u will do.
Steps to RollBack If there is a problem
Reboot the Esxi server press SHIFT+R to access recovery mode
Connect to the host using ILO, DRAC, RSA, etc..
Reboot the ESXi hosts
Press SHIFT+R to enter into recovery mode
It will promp with a new screen with the Hypervisors installed. One would be the
default which is Update1
To confirm Roll back Press Y
Server will be rebooted and reverted to the previous version of ESXi 5
Command to remove the Patch
esxcli --server=server_name software vib remove --vibname=name
11… Command to check lun details , HBA card, Seriel number,
esxcli storage core path list Lists all LUN paths currently connected to the ESXi host.
esxcli storage core device list gives a list of LUNs currently connected to the ESXi host.
12…Command to check vms process list & kill the process.
esxcli vm process list
esxcli vm process kill –t soft -w WorldID
13… How will you Enable SSH
Command to Enable : vim-cmd hostsvc/enable_ssh
Command to start : vim-cmd hostsvc/start_ssh
To Enable in GUI :
Click the Host Configuration Security Profile Properties
14…What are the Esxi Sever Partitions
Bootpartition (4 MB): This partition is needed for booting
Bootbank (250 MB): Boot Image is saved on this FAT partition.
It will be extracted during the boot process and loaded into the system memory.
vSphere 4 this file size is 70 MB, vSphere 5 file size 250 MB.
AltBootbank (250 MB): This partition is empty after a fresh install. Once we update of
ESXi, the current image is copied from the bootbank partition here.
This makes it possible to return to the last known good configuration by typing “Shift + R”
while booting if there occures an error during the update of an ESXi host.
Dump/crash partition (110 MB): In the case of a total crash of the host a dump file is
written on this partition.
Store (285 MB): Different ISO files for the VMWare Tools are available for all
supported operating systems.
Scratch partition (4 GB): This partition is only created if the installation media has at
least 5 GB of space. It is used for the log files of the VMKernel.
If this partition is missing, the logs of the host are lost after a reboot or shutdown.
15…What is host isolation. How Host Isolation is detected?
ESX hosts uses heartbeats to communicate with other hosts in the [Link] default,
Heartbeat will be sent every 1 second.
If a ESX host didn't receive heartbeat for 13 seconds from any other hosts, The host will
consider it as isolated and host will ping the configured isolation address(default gateway
by default). If the ping fails, VMware HA will execute the Host isolation response
16…HA – AAM, FDM
Esxi 4.1 - AAM - Automated Availability Manager
Esxi 5.0 - FDM - Fault Domain Manager
AAM is the agent of HA in Esxi 4.1
FDM is the name of the agent in Esxi 5.0
The primary/secondary node mechanism in Esxi 4.1
Master Host , Slave Host concept in Esxi 5.0
The FDM Agent is responsible for communicating host resource information, Hosts
& vm status and HA properties to other hosts in the cluster heartbeat mechanisms,
vm placement, vm restarts,
log file is stored /var/log/ [Link]
FDM Master
---- The FDM Master monitors all hosts and VMs and slave hosts.
---- if host failure happens, the master restarts all VMs on another host.
---- It keeps a list of VMs protected, which is updated after every power off or on done by user.
---- keeps track of any adding/removing of hosts.
---- sends periodically status reports to vCenter
Slave
--- A slave monitors the vms it is running and informs the master about any changes.
--- The slave also monitors the health of the master by monitoring heartbeats.
--- If the master fails, the slaves initiate and participate in the election process.
Datastore Heartbeat - New concept in 5.0
--- If the primary network goes down this secondary network is used to find out
Whether the host is failed or isolated / partitioned host.
--- It Prevents Unnecessary Restarts due to isolation
17…What is the Pre-Requesties of HA, Vmotion
VMotion Pre-requisites
- Compatible Processors - Source and Destination hosts should have compatible
processors
- VMotion requires a Gigabit Ethernet network between hosts
- Shared Storage
- All virtual machines files should be accessible by source and target hosts
- Virtual machine swap files should be accessible to source and destination hosts
- Create vmkernal port and VMotion-enabled managed hosts.
- Port Number 8000 should be opened.
- Configure all managed hosts to use shared VMFS volumes
- Ensure the VMFS volume has space to store all virtual disks of virtual Machines
- Ensure all VMFS volumes on source and destination hosts use volume names, and all
virtual machines use those volume names for specifying the virtual disks.
HA prerequisites:
- Compatible Processors
- requires a Gigabit Ethernet network between hosts
- Shared Storage
- All hosts must be licensed for VMware HA.
- All virtual machines files should be accessible by source and target hosts
- Each ESX server in the cluster should have access to the virtual machines’ files and should be
able to power on the virtual machine without a problem
- You need at least two hosts in the cluster.
- All hosts need a unique host name.
- All hosts need to be configured with static IP addresses. If you are using DHCP, you
must ensure that the address for each host persists across reboots.
- All hosts must have access to the same management networks
18…How will you Trouble Shoot Vmotion Failure
If VMotion fails:
1. Check whether CPU is compatible
2. Check the ports 8000 is open or not
3. Enough resources must be made available on the target ESX/ESXi host
4. Verify that the required disk space is available.
5. Ensure VMKerenl Port configured , VMotion Option is enabled
6. Vmkping x.x.x.x Enter the hostname or IP address of the server that you want to ping
7. Verify that time is synchronized across environment
8. if reconnecting the ESXi host resolves the issue
9. Ensure CD-ROM is not mounted.
10. Storage - unresponsive/busy disk, network timeouts...
Which Logs to check for vmotion failures
check VMkernel logs on both source and destination host for clues to failure.
VMkernel logs - /var/log/vmkernel
check hostd logs on both source and destination host.
Hostd logs - /var/log/vmware/hostd*.log
19…How will you Trouble Shoot HA Failure
1. Check any network problem exists
2. Check the DNS is configured properly
3. Check HA agent status using command - service vmware-aam status
4. Check hosts named uniquely .
5. Check HA related ports are open in firewall to allow for the communication
Incoming port: TCP/UDP 8042-8045
Outgoing port: TCP/UDP 2050-2250
6. Try to restart /stop/start the HA agent on the affected host using the below
commands. try to restart vpxa and management agent in the Host.
service vmware-aam restart
service vmware-aam stop
service vmware-aam start
7. Right Click the affected host and click on "Reconfigure for VMWare HA" to re-install
the HA agent that particular host.
Goto cluster settings and uncheck the vmware HA to turnoff the HA in that cluster and
re-enable the vmware HA to get the agent installed
8. Remove the affected host from the cluster and add. To Remove the host -- put into
Maintenance mode.
20…Is it possible to Vmotion from one cluster to another cluster
Requirements:
1) ESX Servers must be managed by the same Virtual Center server
2) The VMs disk files must be stored on shared storage
3) Hosts Must have compatible CPUs
4) ESX Servers must be in same network segment configured with VMkernel ports enabled
for vmotion
5) Enable Jumbo Frames for Maximum Latency between the sites
6) The IP subnet of the virtual machine must be accessible for both source and destination
ESX servers
21… 5.0. 5.1 New Features
5.0
Storage Distributed Resource Scheduler (SDRS)
Profile-Driven Storage
Auto-Deploy
VMware vSphere Storage Appliance
VCenter Server Appliance
New virtual machine version version 8
5.1
ESXi/vSphere 5.1 License is per-CPU-socket based . Not vRAM based like 5.0
Support more recent hardware (both Intel and AMD). New "Version 9 virtual hardware"
It is possible to allow any VM generated on VMware ESX Server 3.5 or later to continue to
run on ESXi 5.1 unchanged (i.e., without being forced to shut down, update to the version 9
virtual hardware, and restart)
ESXi 5.1 comes with hardware accelerated 3D Graphics support.
vSphere Replication is now available independently from SRM. vSphere Replication allows
to mirror a VM to another datastore, it can be restarted there when the primary storage fails.
So far you could use vSphere Replication only together with the Site Recovery manager
(SRM) product,
Zero downtime VMware Tools Upgrade. Once the new VMware tools of vSphere 5.1
installed in a VM then you can later upgrade that to any newer version without rebooting a
VM.
Enhanced VMotion
Enhanced VMotion allows to migrate a VM from one host to another and to a different
storage at the same time without the need to power off the VM!
This enables you to live migrate a VM between different clusters (that usually do not share
any storage) or even between different stand alone hosts that each use local storage only.
22…Port Groups
vSwitches can be divided into smaller units called port groups
Port Groups are nothing but the VLANs or virtual local area networks
1. Virtual Machine Port Group - Used for Virtual Machine Network
2. Service Console Port Group - Used for Service Console Communications
3. VMKernel Port Group - Used for VMotion, iSCSI, NFS Communications
5.0
1. Virtual Machine Port Group - Used for Virtual Machine Network
2. VMKernel Port Group - Used for VMotion, iSCSI, NFS Communications
The management vmkernel port on ESXi 5.0 is same as Service Console port on ESX
23…Port Numbers
443 – Communication between vCenter Server to vSphere Client
902 -- VCenter Server to hosts. hosts send heartbeat over UDP port 902 to the vCenter
Server
HA Ports
Incoming port: TCP/UDP 8042-8045
Outgoing port: TCP/UDP 2050-2250
Vmotion Port – 8000
P2V Ports
443 and 902 - Source to ESX/VC
445 and 139 - Converter to source and source to Workstation/Server
24…What are the files in a Virtual Machine ?
.vmx - Virtual Machine Configuration File
.nvram - Virtual Machine BIOS
.vmdk - Virtual Machine Disk file
.vswp - Virtual Machine Swap File
.vmsd - Virtual MAchine Snapshot Database
.vmsn - Virtual Machine Snapshot file
.vmss - Virtual Machine Suspended State file
.[Link] - Current Log File
.vmware-#.log - Old Log file
25….Difference between Standard vswitch , Distributed vSwitch
-- One Standard VSwitch per host. Cannot connect multiple hosts.
A Distributed Switch can connect multiple hosts.
-- Standard VSwitch Managed at host level.
A Distributed Switch managed at Cluster Level.
-- STP Spanning-Tree Protocol is not in vswitches. Its only in Distributed switch.
It prevents loops in the LAN and selects the fastest network Links.
If one network link goes down, Spanning Tree will use the alternate link.
-- A vswitch dont perform IGMP Snooping. . Its only in Distributed switch
IGMP Snooping allows switches to read IGMP packets and forwarding network
packets based on their content.
-- DvSwitches also support distributed port groups or dvport groups.
26…Maximum Minimums
ESX 5.1 ESX 5 ESX 4.1
VCPUs per vm 64 32 8
VPUs per host 2048 2048 512
RAM per vm 1TB 1TB 255GB
RAM per host 2TB 2TB 1TB
Check for other details………I cant copy paste all…..
27…Esx Esxi Difference
ESXi Server has no service console
ESXi Server uses RCLI (Remote command line interface) instead of service
console utilities
ESXi Server is extremely thin = fast installation + faster boot
ESXi is so small that it can be easily installed and can even be booted from a
USB Flash disk
ESXi Server’s service console (firewall) is configured differently
ESXi Server has a “yellow firmware console”
ESXi Server has server health status built in
ESXi Server requires fewer patches and less rebooting
ESX server can be connected through direct-attached serial cable.
ESXi does not support interaction through direct-attached serial cable.
ESX supports Active Directory integration through third-party agents installed on the
Service Console.
ESXi allows users to login directly and authenticate in AD using a local username and
password.
28…Tell P2V steps
Take Backup of Physical Server
Note Down HostName , Ip Add, GW, DNS Ips.
C: D: Info…. Take a Screen Shot of it.
Stop the following services:
Start – Run – [Link] and click on Status until the Started services are listed first.
Backup services. Examples: TSM, NetBackup.
Database services. Examples: SQL, Oracle, MySQL, Exchange Serve.
Anti-Virus software. Examples: McAfee, Norton, Trend Micro.
Web Hosting [Link]: World Wide Web Publishing service, IIS, Apache.
Print Spooler service.
Disable the following services:
All vendor-installed hardware management services.
All update services that are set to “Automatic” startup
Examples: Windows Update/Automatic Updates, Altiris, PatchLink Update.
Start the Following Services
Server and Workstation processes ,Volume Shadow Copy and Microsoft Software
Shadow Copy Provider are started.
Start P2V Process
RDP into the machine from which you will run VMware Converter Standalone Client 5.
Steps after Conversion
Remove any Serial Ports or USB Adapters from the hardware list if any are shown.
Check RAM size and the number of CPUs is correct.
In the “Network Adapter” section, “Connect at power on” check box not ticked.
Correct VLAN selected.
Now Power-On the Converted VM
Install VMware Tools
Software Removal
Remove all vendor-installed hardware management programs from “Add/Remove Programs”.
Remove the VMware Converter Agent software from “Add/Remove Programs”.
Remove any physical hardware drivers from “Add/Remove Programs” such as display drivers.
Do not reboot if prompted.
Hardware Removal
Go to a CMD prompt and type:
SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
and then
[Link] to open Device Manager
and then select “Show Hidden Devices” from the Device Manager “Action” or “View” menu.
RDP into the source machine Disable the NIC card
virtual machine Edit Settings network cardclick the “Connect” then the “Connect At
Startup”
Power on The VM and Check the services and start the services.
29…Esxi 4.1 & Esxi 5.0 License Difference
4.1 Based on CPU Core
5.0 Based on RAM
5.1 Based on CPU Core
30…Why cant upgrade from 3.5, 4.0 to 5.0
5.0 Uses 64 bit Hardware and OS
So upgrade to 4.1 then to 5.0
3.5, 4.0 Boot Partition is 1 GB.. 5.0 is 4 MB
Important Commands will be asked
To check the Hardware details : esxcli hardware platform get
UUID: 0x74 0xd3 0x36 0x4 0x3c 0xe7 0x11 0xdf 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x11
Product Name: N20-B6625-1
Vendor Name: Cisco Systems Inc
Serial Number: FCH1432V1HY
IPMI Supported: true
Show ESXi version and build : esxcli system version get
To Find hostname. : # esxcli system hostname get
To Poweroff, Reboot a host, it must be in maintenance mode
Power off a host : # esxcli system shutdown poweroff --delay=10 --reason=”Hardware
maintenance”
( Delay and Reason parameter must be provided. )
Reboot the host : esxcli system shutdown reboot -d 10 –r “Patches applied”
Enter Maintenance Mode : esxcli system maintenanceMode set –enable yes
Exit maintenance Mode : esxcli system maintenanceMode set --enable no
esxcli storage core path list Lists all LUN paths currently connected to the ESXi host.
esxcli storage core device list List of LUNs currently connected to the ESXi host.
esxcli storage filesystem list : List of all datastores mounted to an ESXi host
esxcli storage core adapter list -- To find HBA WWN on ESXi 5.0
Configuration tab Hardware Storage Adapters:
To list the available port groups : esxcli network vswitch standard portgroup list
list current vswitch configuration : esxcli network vswitch standard list
list NIC cards and their link state : esxcli network nic list
list Distributed Switch configuration : esxcli network vswitch dvs vmware list
list vmkernel interfaces and configuration : esxcli network ip interface list
How will you remove a LUN from a host
ESX/ESXi 4.1
The best practices for removing a LUN from an ESX 4.1 host
Unregister all objects from the datastore including VMs and Templates
Ensure that no 3rd party tools are accessing the datastore
Ensure that no vSphere features, such as Storage I/O Control, are using the device
Mask the LUN from the ESX host by creating new rules in the PSA (Pluggable Storage
Architecture)
Physically unpresent the LUN from the ESX host using the appropriate array tools
Rescan the SAN
Clean up the rules created earlier to mask the LUN
Unclaim any paths left over after the LUN has been removed
Esxi 5.0
1. Unregister all objects from the datastore including VMs and Templates
2. Ensure that no 3rd party tools are accessing the datastore
3. Ensure that no vSphere features, such as Storage I/O Control or Storage DRS, are using the
device
4. Detach the device from the ESX host; this will also initiate an unmount operation
Choose the Devices View (Under Configuration > Storage):
To Patch an ESXi 5.0 host from the command line:
“ Install “ command overwrites the existing packages. It may downgrade the existing packages,
Overwrite existing drivers.
“ Update” command is the recommended. It will update from lower version to new.
Patching Steps
1. Patches can be downloaded from the VMware patch portal. Select ESXi (Embedded and
Installable) in the product dropdown and click Search.
2. Upload the patch to a datastore using the Datastore Browser from vCenter or a direct
connection to the ESXi 5.0 host using the vSphere client.
3. Log into the local Tech Support Mode console of the ESXi 5.0 host.
4. Migrate or power off the virtual machines and put the host into maintenance mode.
# vim-cmd hostsvc/maintenance_mode_enter
5. Navigate to the directory on the datastore where the patch file was uploaded
# cd /vmfs/volumes/Datastore/DirectoryName
# ls
Where Datastore is the datastore name where the patch file was uploaded to, and
DirectoryName is the directory you created on the datastore.
o Install or update a patch on the host using these esxcli commands:
o To Install: Using local setup:
# esxcli software vib install -d "/vmfs/volumes/Datastore/DirectoryName/[Link]"
o esxcli software vib install -d /vmfs/volumes/[DATASTORE]/[PATCH_FILE].zip
Where [Link] is the name of the patch file you uploaded to the datastore.
# esxcli software vib install -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-
[Link]"
o Using http setup:
# esxcli software vib install -v viburl
Where viburl is the URL to the http depot where VIB packages reside.
# esxcli software vib install -v
[Link]
light/VMware_locker_tools-light_5.[Link]
To Update: Using local setup:
# esxcli software vib update -d "/vmfs/volumes/Datastore/DirectoryName/[Link]"
Where [Link] is the name of the patch file you uploaded to the datastore.
# esxcli software vib update -d "/vmfs/volumes/datastore1/patch-directory/ESXi500-
[Link]"
o Using http setup:
# esxcli software vib update -v viburl
Where viburl is the URL to the http depot where VIB packages reside.
o # esxcli software vib update -v
[Link]
light/VMware_locker_tools-light_5.[Link]
6. Verify that the VIBs are installed on your ESXi host:
# esxcli software vib list
Name Version Vendor Acceptance Level Install Date
----------------- --------------------------- ------ ----------------------------------------------------
ata-pata-amd 0.3.10-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-04
ata-pata-atiixp 0.4.6-3vmw.500.0.0.469512 VMware VMwareCertified 2012-05-
7. After the patch has been installed, reboot the ESX host:
# reboot
8. After the host has finished booting, exit maintenance mode and power on the vms .
# vim-cmd hostsvc/maintenance_mode_exit
Install vmtools
Install VMware Tools:
1. Download and install the keys:
Create a file [Link] under path /etc/[Link].d/with the below content –
Install the VMware Tools with below command
To perform a silent, non-GUI with suppressed reboot VMware Tools installation in a Windows guest
operating system:
In ESXi 5.0.x and earlier versions, run this command:
[Link] /S /v"/qn REBOOT=ReallySuppress
In ESXi 5.1.x, run this command:
[Link] /S /v"/qn REBOOT=R"