Skip to content

Commit 9e4268c

Browse files
committed
Only set shutdown status for persistent domains
1 parent 9408b94 commit 9e4268c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ch/ch_monitor.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,10 @@ static inline int virCHMonitorShutdownVm(virDomainObjPtr vm,
725725
return -1;
726726

727727
virCHProcessStop(driver, vm, reason);
728-
if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir))
729-
VIR_WARN("Failed to persist the domain after shutdown!");
728+
if (vm->persistent) {
729+
if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir))
730+
VIR_WARN("Failed to persist the domain after shutdown!");
731+
}
730732
virCHDomainObjEndJob(vm);
731733

732734
return 0;

0 commit comments

Comments
 (0)