Guest OS shutdown

Shutting down a physical machine with the power on/of button is  equivalent to shutting down a VM from flexVDI software.

  • When you push the power button, an ACPI shutdown power event is sent to the OS. The OS is supposed to start a shutdown sequence, but what to do is up to the OS, and it may or may not honor the request.
  • When you send "Shutdown" to a Windows guest from flexVDI Dashboard or flexVDI client, MS Windows OS will receive the request and it will decide what to do.

The "force shutdown" in flexVDI software is equivalent to pulling the power cord in a physical machine: it is guaranteed to immediately shutdown the guest, but it can cause data loss and file system corruption.

Shutting down Windows 10 when no user is logged in

By default Windows ignores ACPI shutdown requests when the computer is locked with no user logged in. This instructions have worked in some cases. For more information refer to MS support and documentation.

1.- Open the security policy (secpol.msc) – add ANONYMOUS_LOGON under Local Policies - User Rights - Shut down the system. This action also changed the image of the lock screen for me.
2.- Open powercfg.cpl. Click "Choose what the power buttons do"
Click "Change settings that are currently unavailable"
Under "Shut-down settings" uncheck "Lock" ("Show in account picture menu")

This is where you click your account picture in the start menu and it says "Lock"
So you won't be able to lock your PC from there anymore, and will have to use 'Win+L' instead

The qemu guest agent

In guests that are started by flexVDI manager 3.1.5 and upper, qemu guest agent is supported. This software is included in the "Spice guest tools" component that comes with the flexVDI guest tools 3.1.x for windows. It also uses the virtio serial driver, which is also included in flexVDI guest tools.

qemu guest agent is a windows service that runs in the guests, and receives commands directly from the flexVDI host. It allows it to answer to the shutdown command as an hypervisor administrator expects: gracefully shutdown the machine when it is asked to, instead of opening a confirmation window in the console.

To check if qemu Guest agent is running in a windows guest, open MS Windows "Services" application, and look for "QEMU Guest Agent". Alternatively, run from a power Shell:

> Get-Service Qemu-GA

If there is a problem starting qemu guest agent, it can be manually started. See the exact command line in your "Services" application, but it typically is:

C:\Program Files\qemu-ga\qemu-ga.exe -d

From the host, we can check if qemu guest agent is running in a guest with the following command:


# virsh qemu-agent-command <GUEST_ID> '{"execute":"guest-ping"}'

{"return":{}} # If we get this answer, it is running well