Skip to content

Commit 77d6bbf

Browse files
author
Jerome Maloberti
committed
CA-80579: An HVM without PV drivers can be shutdown/suspend again.
Not supported, but used by CloudStack. Signed-off-by: Jerome Maloberti <[email protected]>
1 parent 83c00d7 commit 77d6bbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ocaml/xenops/domain.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ let shutdown_wait_for_ack (t: Xenops_task.t) ?(timeout=60.) ~xc ~xs domid req =
302302
let di = Xenctrl.domain_getinfo xc domid in
303303
let uuid = get_uuid ~xc domid in
304304
if di.Xenctrl.hvm_guest then begin
305-
debug "VM = %s; domid = %d; HVM guest with PV drivers: not expecting any acknowledgement" (Uuid.to_string uuid) domid;
305+
if Xenctrl.hvm_check_pvdriver xc domid
306+
then debug "VM = %s; domid = %d; HVM guest with PV drivers: not expecting any acknowledgement" (Uuid.to_string uuid) domid
307+
else Xenctrl.domain_shutdown xc domid (shutdown_to_xc_shutdown req)
306308
end else begin
307309
debug "VM = %s; domid = %d; Waiting for PV domain to acknowledge shutdown request" (Uuid.to_string uuid) domid;
308310
let path = control_shutdown ~xs domid in

0 commit comments

Comments
 (0)