
2012/8/8 Eric Blake <eblake@redhat.com>:
On 08/07/2012 01:22 PM, Gutierrez-Robles, Frank wrote:
I have a VM of Microsoft Server 2008 SP1. I am using virsh commands to power it on/off. I can power on/off when the admin is logged in to the Server VM, and when there are no users logged in, but when the admin locks the screen, I cannot seem to power it off. The virsh command states that the domain is being shutdown, but it in fact does not. I looked at some registry settings for the VM (server 2008) and see if I can pinpoint an entry I need to set, but had no luck. Any ideas? Thank you for your support.
If you are able to install the qemu-agent guest agent into your Windows guest, then newer qemu and libvirt have an option to use the guest agent to trigger a shutdown in this situation. But without that, you are stuck with the fact that by default, Windows ignores APCI interrupts when locked. There might be a registry setting you can tweak to make Windows behave differently than default, but offhand I don't know what it would be.
sorry that my english is poor, and i use windows Chinese LANG pack.you could try: 管理工具-本地安全策略-本地策略-安全选项-关机:允许系统在未登录的情况下关闭 and enable is policy. i change is setting on windows2003 and the on/off works good.