Windows VM's do not shut down properly when running as KVM Virtual Machine.

This document (7021066) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise High Availability Extension 11 Service Pack 4
SUSE Linux Enterprise High Availability Extension 12
SUSE Linux Enterprise Virtual Machine Driver Pack

Situation

Windows VirtualDomain cluster resources are not getting shut down cleanly after windows display has gone to sleep.

The logs show the cluster will first try a graceful shutdown (IE: virsh shutdown <domain>) but after the cluster timeout, it issues a "forced" shutdown (virsh destroy <domain>) which is like a power button reset. 
VirtualDomain(Win2012r2)[47054]: INFO: Issuing graceful shutdown request for domain winserver2012.
VirtualDomain(Win2012r2)[47054]: INFO: Issuing forced shutdown (destroy) request for domain winserver2012.
lrmd[5991]:   notice: operation_finished: Win2012r2_stop_0:47054:stderr [ Domain winserver2012 destroyed ]
crmd[5994]:   notice: process_lrm_event: Operation Win2012r2_stop_0: ok (node=rbrunt28, call=199, rc=0, cib-update=172, confirmed=true)

After the domain is started again,  the Windows "Shutdown Event Tracker" will come up asking for reason computer was shut down unexpectedly.

Resolution

Need to change Windows power setting for 'display' to 'never' sleep. 
To change the power configuration:
Control Panel -> System and Security -> Power Options --> Click "Change plan Settings".  Set  "Turn off the display" to Never (default is 10 minutes)

Cause


Additional Information

In testing I found that if you run "virsh shutdown <domain>" once, it appears to wake it up, then if you run it again "virsh shutdown <domain>" it appears to shut it down clean if done before the display sleeps again.

Tested with Win2012r2 and Windows 7.

Cluster configuration:
primitive Win2012r2 VirtualDomain \
        meta target-role=Stopped allow-migrate=true is-managed=true maintenance=false \
        operations $id=Win2012r2-operations \
        op migrate_from interval=0 timeout=120 \
        op migrate_to interval=0 timeout=120 \
        op monitor interval=10 timeout=30 trace_ra=1 \
        params config="/images2/winserver2012.orig.xml" hypervisor="qemu:///system" migration_transport=ssh \
        utilization cpu=2 hv_memory=1024

Windows Shutdown Event Tracker screenshot:


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7021066
  • Creation Date: 06-Jul-2017
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise High Availability Extension
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center