2017.06.19 paul woodward - explorevm vmware 101

32
VSPHERE 101 PAUL WOODWARD – SYSTEMS ENGINEER

Upload: paul-woodward-jr

Post on 23-Jan-2018

240 views

Category:

Technology


1 download

TRANSCRIPT

VSPHERE 101PAUL WOODWARD – SYSTEMS ENGINEER

INTRODUCTION• Paul Woodward Jr

• Twitter @ExploreVM

• Blog: ExploreVM.com

• ExploreVM Podcast – iTunes, Google Play, I

Heart Radio, etc..

• Virtual Design Master Season 4 – 3rd

Place

• Tech Field Day 15 Delegate (Sept. 2017)

• Spoken at 8 VMUG meetings across 3

states

• Speaking at Nutanix .Next 2017

OVERVIEW

• Introduction to VMware vSphere

• Snapshots

• Basic vSphere Troubleshooting

• Q&A

VMWARE PRODUCT SUITE

• ESXi - Hypervisor• vSphere Client – Web (Flash & HTML5) Based or Windows #C “fat” client• vCenter Server – Centralized management of the ESXi environment • Workstation & Fusion – Virtualized offering for PC & MAC

• Site Recovery Manager – Automated site to site replication• NSX – VMware virtualized networking offering• vSAN – VMware virtualized storage offering• AirWatch – Mobile device management• Horizon – Virtual Desktop Infrastructure (VDI) platform• vRealize Suite:

• Log Insight• Operations Manager• Automation• Network Insight• Orchestrator

WHAT IS ESXI & HOW DOES IT WORK?

TRIVIA: WHAT DOES ESX STAND FOR?

ELASTIC SKY X

WHAT IS ESXI?

• Type-1 Hypervisor (bare

metal)

• Not an operating system

• VMkernel is the core of ESXi

• Microkernel offering the

minimum software

connectivity between the

hardware and the guest OS

• CPU & Memory is handled

directly by the VMkernel

• Other hardware is handled by

the vmklinux module

COMMON TASKS IN VMWARE

• vMotion – Live migration

• svMotion – Storage vMotion

• Clone

• Full Clone – separate from

parent VM

• Linked Clone – shares virtual

disks

• Snapshots

*Most advanced tasks require vCenter

Server

• Create New VM

• Edit VM Settings

• Can be done as a hot add

• Start/Stop VM

• Browse Datastore

• Configure Virtual Networking

WHAT IS A VIRTUAL MACHINE?

• A virtual machine is a collection of files that create the server

emulation

• These files include:

• VMX file – Configuration

• VMXF file – Supplementational Configuration

• VMDK Files – Disk related files, includes .VMDK, -delta.vmdk, -

rdm.vmds

• VSWP File – Memory overflow (SWAP) file

• VMSD File – Snapshot details

• VMSS File – Memory contents of suspended VM

• VMSN File – Snapshot Files

• NVRAM File – BIOS file

• Log files

SNAPSHOTS: THE SILENT KILLER

SNAPSHOTS – THE MORE YOU KNOW

WHAT ARE SNAPSHOTS?

• Point in Time preservation of

a VM’s Data and State

• All of the files that make up

the VM:

• Disks

• Memory

• Devices

WHAT SNAPSHOT ARE NOT

• Snapshots are NOT Backups

• Snapshots are NOT Backups

• Snapshots are NOT Backups

HOW SNAPSHOTS WORK

1. A request to create, remove, or revert a snapshot for a virtual machine is sent from

the client to the server using the VMware API.

2. The request is forwarded to the VMware ESX host that is currently hosting the virtual

machine that has issue.

3. If the snapshot includes the memory option, the ESX host writes the memory of the

virtual machine to disk

4. If the snapshot includes the quiesce option, the ESX host requests the guest

operating system to quiesce the disks via VMware Tool

5. The ESX host makes the appropriate changes to the virtual machine's snapshot

database (.vmsd file) and the changes are reflected in the Snapshot Manager of the

virtual machine.

6. The ESX host calls a function similar to the Virtual Disk API functions to make

changes to the child disks (-delta.vmdk and .vmdk files) and the disk chain.

THE CHILD DISK

• Child Disk is a Sparse Disk

• Copy on Write

• If a VM is running off a snapshot, it is running off the child disk

• Child Disks can fill a datastore

• I/O is impacted by the existence of a Child Disk

THE DISK CHAIN

DELETE, GO TO, OR CONSOLIDATE SNAPSHOTS

DELETE, GO TO, OR CONSOLIDATE SNAPSHOTS

• Delete - Use the Delete option to remove a single parent or child snapshot from the

snapshot tree. Delete writes disk changes between the snapshot and the previous

delta disk state to the parent snapshot.

• You can also use the Delete option to remove a corrupt snapshot and its files

from an abandoned branch of the snapshot tree without merging them with the

parent snapshot.

• Delete All - Use the Delete All option to delete all snapshots from the Snapshot

Manager. Delete all consolidates and writes changes between snapshots and

previous delta disk states to the base parent disk and merges them with the base

virtual machine disk.

THE TROUBLE WITH “DELETE ALL”

Scenario: 3 snapshots on the VM (graphic from the disk chain slide)

Snapshot 1 – 20GBSnapshot 2 – 10GBSnapshot 3 – 30GB

• When you choose “delete all” the following will happen:

• Snapshot 2 will grow to 40GB at most

• Snapshot 1 will grow to 60GB at most

• Snapshot 1 will be committed to the original VMDK

• All snapshot files are deleted

• In other words: Snapshot 3 is merged into Snapshot 2, Snapshot 2 is merged into Snapshot 1, Snapshot 1 is merged into the original flat.vmdk and afterwards all snapshot files are deleted.

REVERT & GO TO

Revert to Current Snapshot

• Restores the parent snapshot, one level up in the hierarchy from the You are Here position. Revert to Current Snapshot activates the parent snapshot of the current state of the virtual machine.

Go To

• Lets you restore any snapshot in the snapshot tree and makes that snapshot the parent snapshot of the current state of the virtual machine. Subsequent snapshots from this point create a new branch of the snapshot tree.

Restoring snapshots has the following effects:

• The current disk and memory states are discarded, and the virtual machine reverts to the disk and memory states of the parent snapshot.

• Existing snapshots are not removed. You can restore those snapshots at any time

• If the snapshot includes the memory state, the virtual machine will be in the same power state as when you created the snapshot.

PHANTOM OF THE SNAPSHOTS

Phantom Snapshots• Snapshots that do not appear in

snapshot manager• Can degrade performance• Can be identified by rogue .VMDK or

.delta.VMDK files• Quick resolution – Create a new snapshot

and delete all snapshots• If issue persists, escalate to VMware SME

SNAPSHOT BEST PRACTICES

• Do Not Use Snapshots as Backups

• Delete Snapshots ASAP – No longer than 3 days

• Only chain 2-3 snapshots together

• Clear snapshots before:

• Increasing virtual machine disk size

SNAPSHOT TRIVIA!

• Q: What is the maximum recommended time before deleting a

snapshot?

• A: 3 Days (72 hours)

BASIC TROUBLESHOOTING TECHNIQUES

STEP 1 – BLAME THE NETWORK AND WALK AWAY

VCENTER/HOST ALARMS

• Triggered alarms are viewed on the summary page of the Datacenter, Host, VM, or under the Alarms tab.

• Alarms are found under Monitor -> Issues -> Triggered Alarms in the web client• Excellent place to start for troubleshooting issues; many KBs and blogs out there on

resolutions

HOST HARDWARE STATUS

• Moved to web client with 6.0• Select the host -> click Monitor -> Hardware Status• Not always accurate, check within host’s out of band management as well if

hardware issue is suspected

VIRTUAL MACHINE & HOST PERFORMANCE ISSUES

If the VM performs poorly or won’t

boot:

• Verify the host is not overloaded

• Verify storage is still available to

the host

• Verify the Datastore is not full

• Adequate resources allocated to the

VM?

• Verify networking

• Host performance issues are

usually tied to being overpopulated,

or a single VM consuming

significant amounts of resources

• Free up space on the host through

vMotion or, if necessary, shut down

excess VMs to regain control

• If unable to connect to the host, or

if vCenter Server loses connection

to host: Restart Management

Agents

ESXI DCUI

ESXI SSHEnable ESXi SSH

• Select host -> Manage -> Settings ->Security Profile ->

Highlight SSH ->Edit Restart Management Agents• /etc/init.d/hostd restart• /etc/init.d/vpxa restart

Export System Logsssh root@ESXHostnameOrIPAddress 'vm-support -s > /vmfs/volumes/datastorexxx/vm-support-Hostname.tgz‘

OPENING A TICKET WITH VMWARE

• U.S. / Headquarters

• 877 486 9273 - Support

• 650 475 5345 – Local

• Target Response Times

• Critical (Severity 1) - 30 minutes or less: 24x7

• Major (Severity 2) - 4 business hours

• Minor (Severity 3) - 8 business hours

• Cosmetic (Severity 4) - 8 business hours

• Pull logs and submit with ticket

• Detail all troubleshooting performed in detail to save time

• Typically GSS will work on the issue for 1 hour then escalate

TROUBLESHOOTING TRIVIA!

• Q: How do you regain access to a host if it’s lost contact to

vCenter or the vSphere client?

• A: Restart Management Services

RECOMMENDATIONS FOR CLIENTS

vRealize Log Insight

• Centralized log management

• Included with vCenter license

• 25 OSI licenses included with

vCenter

vCheck Reports

• PowerShell HTML framework

script

• Community driven and open

source

• 160+ reporting metrics

• Can be scheduled & output to

email

ANY QUESTIONS

All links & slide deck will be on www.ExploreVM.com