advanced troubleshooting of esxi server 6.x for … · advanced troubleshooting of esxi server 6.x...

38
Ragavendra P Kumar & Abhilash Kunhappan SER2965BU #VMworld #SER2965BU Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 Content: Not for publication or distribution

Upload: buidan

Post on 27-Jul-2018

249 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

Ragavendra P Kumar & Abhilash Kunhappan

SER2965BU

#VMworld #SER2965BU

Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 2: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

• This presentation may contain product features that are currently under development.

• This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.

• Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.

• Technical feasibility and market demand will affect final delivery.

• Pricing and packaging for any new technologies or features discussed or presented have not been determined.

Disclaimer

2#SER2965BU CONFIDENTIAL

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 3: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

3#SER2965BU CONFIDENTIAL

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 4: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

chmod 777 <user>

#SER2965BU CONFIDENTIAL 4

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 5: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

2. Commands?

Configuration Files?1.

3. Log Files?

in ESXi Server

Do You Know?

#SER2965BU CONFIDENTIAL 5

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 6: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

Learner Objectives

• Improvise troubleshooting steps for a vSphere admin by

• Understanding the ESXi Architecture from a component breakdown perspective

• Learn “7” important and key :-

1. Log Files : which log files to review and when

2. ESXi Commands : to isolate and troubleshoot issues

3. Configuration Files : forms the backbone of troubleshooting sessions

#SER2965BU CONFIDENTIAL 6

Every VMworld session is time bound and we will cover as much as we can.

For all remaining questions, we are always a phone call away.

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 7: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

Agenda

#SER2965BU CONFIDENTIAL 7

©

1 7 Important Log files

2 7 Key ESXi Commands

3 7 Significant Configuration Files

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 8: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

ESXi – Architecture

User worlds

#SER2965BU CONFIDENTIAL

VIM Clients

HTML 5 - vSphere

WebClient

HTML 5 – ESXi

Host Client

Power

CLI

vCenter Server

vpxd DRS

FT

HAVIM

Hostd

vpxa

FDM

VMX

Processesxcli

localcliShell

Server Hardware

vSCSI

VMkernel

User world Support

Resource Scheduler

Network

Stack

Storage

Stack

vmkapi and Interrupt handler

Sys

Calls

VM

K C

all

vN

ICD

VF

ilte

r

vSCSI

VMM

Monitor

Guest OS & Apps

vCPU

8

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 9: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

ESXi Log Files

#SER2965BU CONFIDENTIAL 9

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 10: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

1. vmksummary.log – Abrupt Host reboots

#SER2965BU CONFIDENTIAL 10

• Time stamp indicating ESXi server reboot

• Disable the Automated Server Recovery feature from the BIOS to avoid automatic reboots

• VMkernel will always track Host reboots, the below shows host rebooting has not been tracked

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 11: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

2. boot.gz log - Slow Boot Issues

• To troubleshoot both slow boot and boot process hang of ESXi server

• Location : /var/log/boot.gz

• Use DCUI - Alt + F12 to review VMkernel messages during this time

• Enabling Serial logging using (Shift + o) at the start up screen for log redirection

– vmkBootVerbose=TRUE vmbLog=TRUE logPort=com1

– debugLogToSerial=1 logPort=com1 no-auto-partition bootUUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#SER2965BU CONFIDENTIAL 11

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 12: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

2. boot.gz log - Slow Boot Issues

• Slow ESXi Boot Issues when, RDM devices are not perennially tagged

• Validate the esx.conf file with a key word search “perennialResvd” with respect to the NAA.ID of the LUN

• Command to set the perennially reserve tag per LUN

# esxcli storage core device setconfig -d naa.id --perennially-reserved=true

#SER2965BU CONFIDENTIAL 12

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 13: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

3. hostd & hostd-probe.log – ESXi Not Responding

• hostd unresponsive and Host Not responding from vCenter server

• A successful hostd process start up or working fine hostd process should finish reading and populating the “vmInventory.xml” file

#SER2965BU CONFIDENTIAL 13

• Direct Connect to the ESXi with Host client should also validate the hostd status

• Do NOT restart the ESXi Server when hostd is in a loop if you need to pursue the cause

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 14: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

3. hostd.log – ESXi Not Responding

• Understanding the Hostd status and validating the Hostd service restart is successful

#SER2965BU CONFIDENTIAL 14

• Key words search in hostd.log – “BEGIN SERVICES”

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 15: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

4. vmware.log - Virtual Machine Issues

• VM Power ON issues

• Attempt a Virtual Machine power ON and then validate the below log

• Identify the cause of the Power ON failure

#SER2965BU CONFIDENTIAL 15

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 16: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

5. vmkernel.log - Storage Issues

#SER2965BU CONFIDENTIAL 16

Understanding SCSI Sense codes are key for Storage issues

• SCSI codes which are T10 org defined codes

http://www.t10.org/lists/2op.htm

• SCSI sense codes

http://www.virten.net/vmware/esxi-scsi-sense-code-decoder/

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 17: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

6. vobd.log - Network & Storage Issues

• Network showing uplink transition

#SER2965BU CONFIDENTIAL 17

• Storage disconnect messages

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 18: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

7. fdm.log – High Availability (HA) Issues

to identify :-

• the HostID?

• the Host is a Slave or Master?

• the Host that was isolated from cluster?

#SER2965BU CONFIDENTIAL 18

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 19: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

ESXi Commands

#SER2965BU CONFIDENTIAL 19

©

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 20: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

1. To Monitor & Configure ESXi Server Settings…

#SER2965BU CONFIDENTIAL 20

boot

module

process03

vib

profile

sources

04

nic

firewall

vSwitch02

san

vvol

vmfs01

esxcli

cluster

network

datastore

05

list

kill

process06

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 21: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# esxcli

#SER2965BU CONFIDENTIAL 21

VMX World

ID

information VMX Cartel

ID

information

Displaying the ARP

and Neighbor

Discovery cache

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 22: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

2. VMkernel Sysinfo Shell Command…

22

/pNics/vmnic<>/stats

/portsets/vSwitch<>/stats

/bios

/hardwareInfo

/scsifw/devices/.<>/stats

/scsifw/adapters/.<>/stats

hardware

# vsish get <opt.1>/<opt.2>/<opt.3>,….

**

storagenet

#SER2965BU CONFIDENTIAL** take assistance always from GSS when in doubt

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 23: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# vsish

#SER2965BU CONFIDENTIAL 23

Get the VMX

Cartel ID

Get the

GroupID

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 24: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

3. To Manage ESXi & VM Configurations…

#SER2965BU CONFIDENTIAL 24

login

connect

registervm

03

auth

task_list

task_cancel04

net

storage

firmware02

getallvms

power.getstate

get.guest

01

vim-cmd

port_info

service_list

remove_service05

vprobes

shutdown

refresh_pnic06

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 25: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# vim-cmd

#SER2965BU CONFIDENTIAL 25

Validates if the Hostd

is running by listing

the VM’s registered

List the tasks running

on the ESXi host

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 26: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

4. To Manage VMFS Volumes & Virtual Disks…

#SER2965BU CONFIDENTIAL 26

to check Inode integrity of a vmdk file in VMFS layer and not in GOS

level

to check VM Snapshot Chain consistency like

PID & CID in vmdks

to check & correct basic file level

issues of a vmdk file in VMFS layer

-e

-v10

-t10

-v10

-x.

check,

repair

# vmkfstools <opt.1> name.vmdk <opt.2>

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 27: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# vmkfstools

#SER2965BU CONFIDENTIAL 27

VM Snapshot Chain

Consistency check

Check or Repair

the Virtual Disk

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 28: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

5. # memstats – to Get Detailed Memory Statistics

• VM is identified by the VMX cartel ID using the command ps | grep –i <vmx name>

• Memstats –r vm-stats –s name:<choose the options needed>

#SER2965BU CONFIDENTIAL 28

Get the VMX cartel

ID

Virtual Machine Stats check

based on the VMX cartel ID

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 29: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# memstats

• VM is identified by the VMX cartel ID using the command ps | grep –i <vmx name>

• Memstats –r swap-stats –s name:<choose the options needed> -u mb

#SER2965BU CONFIDENTIAL 29

Swap Statistics on the

Virtual Machine

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 30: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

6. # pktcap-uw - Network Packet Capture Analysis Tool

#SER2965BU CONFIDENTIAL 30

• pktcap-uw --trace -- vmk <vmk port>

• pktcap-uw --trace -- uplink <uplink name>

Output can be redirected to

a file as well

MAC address of the Port

that is being captured

Shows packet traverse path from

each layer and to identify drop

within the ESXi host

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 31: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

7. To Monitor Core ESXi Performance…

#SER2965BU CONFIDENTIAL 31

virtual machine

esxtopnetwork(vSwitch, uplinks)

vSAN

Power(usage & management) CPU

memory

disk (hba level info)

storage(LUN specific)

c

m

d

u

x

n

p

v

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 32: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

# esxtop

#SER2965BU CONFIDENTIAL 32

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 33: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

ESXi – 7 Effective Commands for Troubleshooting

#SER2965BU CONFIDENTIAL 33

1. esxcli : Monitoring or configuring ESXi infra settings

2. vim-cmd : Managing ESXi server & Virtual Machine related configurations

3. vsish : VMkernel Sys Info Shell

4. vmkfstools : for management of VMFS volumes & virtual disks from command line

5. memstats : Memory statistics

6. pktcap-uw : An enhanced Network packet capture analysis tool

7. esxtop : Real time performance monitoring

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 34: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

ESXi Configuration Files

#SER2965BU CONFIDENTIAL 34

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 35: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

7 Configuration File

#SER2965BU CONFIDENTIAL 35

1. /etc/vmware/esx.conf : Holds information about Storage, Network and Hardware

2. /etc/vmware/hostd/vmInventory.xml : Virtual Machine Inventory list update on the ESXi

3. /etc/vmware/hostd/authorization.xml : vCenter to ESXi host connection – authorization

4. /etc/vmware/vpxa/vpxa.cfg : vCenter and ESXi connectivity

5. /etc/vmware/vmkiscsid/iscsid.conf : iSCSI configuration file

6. /etc/vmware/fdm : FDM config file with Clusterconfig, Hostlist and VM metadata

7. /etc/vmware/license.cfg : License configuration file for ESXi hostVMworld 2017 Content: Not fo

r publication or distri

bution

Page 36: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

Q & A

36#SER2965BU CONFIDENTIAL

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 37: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

VMworld 2017 Content: Not fo

r publication or distri

bution

Page 38: Advanced Troubleshooting of ESXi Server 6.x for … · Advanced Troubleshooting of ESXi Server 6.x for vSphere Gurus VMworld 2017 ... 6. /etc/vmware/fdm: FDM config file with Clusterconfig,

VMworld 2017 Content: Not fo

r publication or distri

bution