]> git.proxmox.com Git - qemu-server.git/commit - PVE/API2/Qemu.pm
change shutdown behaviour on suspended vm
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 12 Apr 2016 08:54:21 +0000 (10:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 12 Apr 2016 15:18:55 +0000 (17:18 +0200)
commit8989736707634628a43de8e2737e858518513d27
tree5f807f12ca80caa8286551e4cda3cbd87a5890d6
parentc881ad2f2c5c36ce64ba8b514f98cde598d09f4b
change shutdown behaviour on suspended vm

previously, when shutting down a suspended vm,
we successfully send the shutdown command to it,
but it will not shutdown (because it is suspended)

there we will run into the timeout and either
bail out with an error, or kill the process

when we not kill the process and resume the vm,
it will instantly shutdown, because of the previous
command

this patch checks the status of the vm beforehand,
and either bails out with an error that you cannot
shutdown a suspended vm, or stops the vm with the
correct qmp command (depending of forceStop)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Qemu.pm