mirror of https://gitee.com/openkylin/libvirt.git
libxl: queue shutdown event on domain shutdown
Emit libvirt shutdown event when receiving LIBXL_SHUTDOWN_REASON_POWEROFF event from libxl. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
7eb37a0d65
commit
84a6209d7f
|
@ -381,6 +381,9 @@ libxlDomainShutdownThread(void *opaque)
|
|||
VIR_DOMAIN_EVENT_STOPPED_CRASHED);
|
||||
reason = VIR_DOMAIN_SHUTOFF_CRASHED;
|
||||
} else {
|
||||
dom_event = virDomainEventLifecycleNewFromObj(vm,
|
||||
VIR_DOMAIN_EVENT_STOPPED,
|
||||
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN);
|
||||
reason = VIR_DOMAIN_SHUTOFF_SHUTDOWN;
|
||||
}
|
||||
libxl_domain_destroy(ctx, vm->def->id, NULL);
|
||||
|
|
Loading…
Reference in New Issue