51
VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Embed Size (px)

Citation preview

Page 1: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring and Guest Clustering with Windows Server 2012Luke NotleyTechnical Consultant – Red Ember

VIR324

Page 2: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 3: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 4: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Application Health Monitoring TodayWindows Server 2008 R2

Page 5: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 6: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Overview

Application Health detection inside virtual machineCluster service in host takes remedial actionIndependent of Guest Clustering

No need for clustering in guest

Windows Server 2012 RequiredAs both host and guest OS

Windows Server 2012 Hyper-V integration services on guest Installed by default

Page 7: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012What can we monitor?

Virtual Machine Management Service

• Any NT Service• For instance: SQL, IIS, Print Spooler,

Exchange

Services

• System, Application, Security Logs• Customized applications using ETW

loggingEvents

Page 8: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Components

VMBus Logical inter-partition communication channelInstalled with Hyper-V Integration Services

Host Guest

Cluster Service

COM Interface

Task Scheduler

VM Resource DLL

Event Log

Service Control Mgr

Hosted Service

Hyper-V WMI Provider

VMBus

Page 9: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012How does it work?

Service Process Fails in Guest

SCM Logs Event 7034

(Failure not handled by SCM)

Task Scheduler launches custom

task

Custom task callsVM Monitoring

COM API

GuestInCriticalState WMI property set by heart-beating

over VMBus

VM Resource detects secondary

failure during IsAliveEx()

Cluster service Failure handling

policy

VM Resource Offlined

VM resource Onlined OR Moved

to another Node

1

9

8

7

4

5

6

3

2

Page 10: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Recovery Steps1. Application level recovery

Service Control Manager (SCM)

2. Guest level HA recovery Cluster Service Reboots VM

3. Host level HA recovery

Cluster Service fails over VM to another node

SAN

Page 11: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 12: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Configuration

Inside the Guest or via Cluster Manager

Page 13: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Configuration from Cluster Manager

Page 14: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012In Guest Configuration - Firewall

PowerShell:Set-NetFirewallRule -DisplayGroup "Virtual Machine Monitoring" -Enabled True

Page 15: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012In Guest Configuration – Service

A least one is set to “Take No Action”“Restart Computer” not allowed

Page 16: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Configuration from Cluster Manager

Page 17: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Configuration from Powershell

Add-ClusterVMMonitoredItem –vm <machine Name> –service spooler

Page 18: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Control Host Recovery

Virtual Machine resource properties can change whether automatic recovery for application health monitoring will be enabled or not. Default is enabled.

Page 19: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

demo

VM Monitoring – Cluster Manager Configuration

Page 20: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012In Guest Configuration – VM Monitor

Log in with Administrator privileges to the guest OSInstall Failover Cluster Management Tools

Add-ClusterVMMonitoredItem –service spoolerAdd-ClusterVMMonitoredItem –EventLog Application –EventSource SQLServer –Eventid 666

Guest and Host can be in different domains using this method

Page 21: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012In Guest Configuration – VM Monitor

Add-ClusterVMMonitoredItemSetup Monitoring for Event or Service in a VM

Get-ClusterVMMonitoredItemRetrieves the list of services and events currently being monitored in the VM

Remove-ClusterVMMonitoredItemSetup Monitoring for Event or Service

Get-ClusterResourceCan be used to monitor for embedded failures (critical state)

Reset-ClusterVMMonitoredStateClears embedded failures (critical state)Run on guest or through PowerShell remoting

Page 22: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

demo

VM Monitoring – In Guest Configuration

Page 23: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 24: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting – Management Console

Is the guest reachable from the management console?Check firewall settingsVerify Cluster Admin permissionsCheck guest domain

Page 25: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting - Host Side Recovery

Page 26: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting - Host Side Recovery

Event ID 1250 generated when application detected as unhealthyWill be logged whether the cluster host is configured to take recovery actions or not

Page 27: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting – Is it being monitored?

Launch Task SchedulerGo to Failover Clustering/VM Monitoring

Page 28: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting – Cluster Log0000079c.000007a4::2011/08/09-22:13:05.390 INFO [RCM] HandleMonitorReply: EMBEDDEDFAILURE for 'Virtual Machine1', gen(0) result 0/5038.0000079c.000007a4::2011/08/09-22:13:05.390 INFO [RCM] rcm::RcmGroup::UpdateStateIfChanged: (Virtual Machine1, Online --> Pending)000003a8.000010f4::2011/08/09-22:13:05.392 INFO [RES] Virtual Machine <Virtual Machine1>: State change 'Online' -> 'OfflinePending‘000003a8.000013b4::2011/08/09-22:13:15.178 INFO [RES] Virtual Machine <Virtual Machine1>: State change 'OfflinePending' -> 'Offline‘000003a8.000010f4::2011/08/09-22:13:15.679 INFO [RES] Virtual Machine <Virtual Machine1>: State change 'Offline' -> 'OnlinePending‘000003a8.00000c48::2011/08/09-22:13:20.125 INFO [RES] Virtual Machine <Virtual Machine1>: 'Virtual Machine1' successfully started the virtual machine.000003a8.00000c48::2011/08/09-22:13:20.206 INFO [RES] Virtual Machine <Virtual Machine1>: State change 'OnlinePending' -> 'Online'

Page 29: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting – Cluster Remediation

Property Default Action

RetryPeriodRetryThreshold

15 min1 failure

VM failover – Failures exceeds RetryThreshold

RetryPeriodOnFailure 1 hour VM left in failed state on last node

FailoverPeriodFailoverThreshold

6 hours(Nodes – 1)

Fails over to at most FailoverThreshold nodes

IsAlivePollInterval 1 minute Polling for embedded failures

Restart VM• RetryPeriod• RetryThreshold

Failover VM• FailoverPeriod

Terminal State• RetryPeriodOnFailur

e• RetryThreshold

Reference: Failover Cluster Properties http://msdn.microsoft.com/en-us/library/aa369122(v=VS.85).aspx

Page 30: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

VM Monitoring in Windows Server 2012Troubleshooting – Cluster Remediation

Page 31: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 32: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsBefore Windows Server 2012

Role health detection and automatic recoveryMove role to a different VM to allow update of OS or service/application

iSCSI

Cluster

Page 33: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsBefore Windows Server 2012

iSCSI

Target 1

Target 2

VM Network

Internal

iSCSI

Page 34: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsVirtual Fibre Channel Adapter

VMs can connect to Fibre connected SAN LUNs for shared storageiSCSI can still be used, but no longer the only shared storage optionNPIV is used to register WWNN and WWPN

Page 35: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsWindows Server 2012

FC

Target 1

Target 2

VM Network

Internal

FC

Page 36: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsHyperV Virtual Fibre Channel ConfigurationHost configuration

using Virtual Storage Manager…

Page 37: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsHyperV Virtual Fibre Channel Configuration

Page 38: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsVirtual Machine Configuration

Page 39: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsWWN’s

Why does a VM with 1 Virtual Fibre adapter need 2?

Page 40: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsVirtual Fibre Channel – Live Migration

2 WWNs are used for safe and smooth NPIV switching when using Live Migration

Server A Server B Server C

Live Migrate

Live MigrateWWN1 WWN2 WWN1

Page 41: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsVirtual Fibre Channel – Cluster Validation

Page 42: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering EnhancementsGuest Enhancements

Use CSV in the guestImproved backup and filter driver supportFile server and other applications that support CSV

All the other things that make Windows 2012 clusters awesome

Node drain and cluster aware updatingMulti-machine management with Server ManagerImproved ChkDsk completionAnd much more….

Page 43: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 44: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering vs VM MonitoringWhich one?

Guest ClusteringApplications that are currently clustered on physical

Exchange, SQL, File Server, etc…

VM MonitoringAnything else

Print Server

Page 45: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Agenda

Application Health Monitoring in WS2008VM Monitoring – Application level monitoring for VMs

ArchitectureConfigurationTroubleshooting

Guest Cluster enhancementsGuest Clustering vs. VM MonitoringVM Monitoring and Guest Clustering combinedQ and A

Page 46: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering and VM MonitoringCombined

First failure, applications will move to other nodes. Second or third failure will cause the host cluster to shutdown and restart VM

Page 47: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Guest Clustering and VM MonitoringConfiguration

Set cluster service restart action to none for 2nd and 3rd failureConfigure Application Health Monitoring

Page 48: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

demo

Guest Clustering

Page 49: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Session ReviewVM Monitoring

A solution to monitor applications running in VMsSimplified alternative solution to Guest Cluster Universal solution that monitors any Service or EventFlexible configuration options via Failover Cluster Manager or PowerShell

Guest ClusteringVirtual Fibre Channel will make this possible for the breadth of customers and more use case scenarios

Windows Server 2012 is the best platform to virtualize Windows!

Page 50: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

Related Content

Find Me After this session at the Speaker Community Lounge

WSV325 - WS2012 File and Storage Services Management – Jeff Alexander

WSV326 - The Path to Continuous Availability with WS2012 – Luke Notley

WSV332 - Cluster-Aware Updating & the New Generation of WSUS – Orin Thomas

Page 51: VM Monitoring and Guest Clustering with Windows Server 2012 Luke Notley Technical Consultant – Red Ember VIR324

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS

PRESENTATION.