File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -703,6 +703,7 @@ static int virCHMonitorProcessEvent(virCHMonitorPtr mon,
703703 case virCHMonitorVmEventShutdown :
704704 {
705705 virCHDriverPtr driver = CH_DOMAIN_PRIVATE (vm )-> driver ;
706+ g_autoptr (virCHDriverConfig ) cfg = virCHDriverGetConfig (driver );
706707 virDomainState state ;
707708
708709 virObjectLock (vm );
@@ -711,6 +712,9 @@ static int virCHMonitorProcessEvent(virCHMonitorPtr mon,
711712 state == VIR_DOMAIN_SHUTDOWN ) &&
712713 (virCHDomainObjBeginJob (vm , CH_JOB_MODIFY ) == 0 )) {
713714
715+ if (virDomainObjSave (vm , driver -> xmlopt , cfg -> stateDir ))
716+ VIR_WARN ("Failed to persist the domain after shutdown!" );
717+
714718 virCHProcessStop (driver , vm , VIR_DOMAIN_SHUTOFF_SHUTDOWN );
715719
716720 virCHDomainObjEndJob (vm );
You can’t perform that action at this time.
0 commit comments