Skip to contentSkip to conversation

Suggestion - trap window-close of VM

Qemu-devel Richard Neill 2 participants 2 messages Nov 29, 2004

lore
Share & tools
lore
#0 lore raw

Dear All,

A thought that occurred to me. If one is running a virtual machine (eg copy of WinXP), then simply closing the qemu window is a really bad idea, since it will effectively crash the guest.

BUT, given that the user expects to be running an *application* rather than an operating system, the natural thing to do is to close the qemu window, rather than remembering to first do a full shutdown of the guest. This is a very easy mistake to make.

I'd suggest that:

if ((qemu's window is closed from the GUI) and (the guest has not shut down)); then
qemu should pop up a warning dialog:
"Are you sure you want to quit - you should really shut
down the guest first, or you may suffer dataloss [yes] [no]"
fi

Is it possible to know whether the guest has finished shutting down from the CPU state?

Regards

Richard

#1 lore raw
Quoted 1 line · Richard Neill

Dear All,

Hi,

Quoted 3 lines

A thought that occurred to me. If one is running a virtual machine (eg copy of WinXP), then simply closing the qemu window is a really bad idea, since it will effectively crash the guest.

Related thought -- it would be way cool if we could make killing qemu do exactly happens when you press the power button on an ACPI-capable machine with any recent OS on it (auto shutdown.)

--L