| str_entry "auto_shutdown_try_shutdown"
| str_entry "auto_shutdown_poweroff"
| int_entry "auto_shutdown_wait"
+ | bool_entry "auto_shutdown_restore"
| bool_entry "auto_save_bypass_cache"
let process_entry = str_entry "hugetlbfs_mount"
# is currently 30 secs)
#auto_shutdown_wait = 30
+# Whether VMs that are automatically powered off or saved during
+# host shutdown, should be set to restore on next boot
+#auto_shutdown_restore = 1
+
# When a domain is configured to be auto-saved on shutdown, enabling
# this flag has the same effect as using the VIR_DOMAIN_SAVE_BYPASS_CACHE
# flag with the virDomainManagedSave API. That is, the system will
cfg->autoShutdownTryShutdown = VIR_DOMAIN_DRIVER_AUTO_SHUTDOWN_SCOPE_ALL;
cfg->autoShutdownPoweroff = VIR_DOMAIN_DRIVER_AUTO_SHUTDOWN_SCOPE_ALL;
}
+ cfg->autoShutdownRestore = true;
return g_steal_pointer(&cfg);
}
if (virConfGetValueUInt(conf, "auto_shutdown_wait",
&cfg->autoShutdownWait) < 0)
return -1;
+ if (virConfGetValueBool(conf, "auto_shutdown_restore", &cfg->autoShutdownRestore) < 0)
+ return -1;
if (virConfGetValueBool(conf, "auto_save_bypass_cache",
&cfg->autoSaveBypassCache) < 0)
return -1;
virDomainDriverAutoShutdownScope autoShutdownTryShutdown;
virDomainDriverAutoShutdownScope autoShutdownPoweroff;
unsigned int autoShutdownWait;
+ bool autoShutdownRestore;
bool autoSaveBypassCache;
char *lockManagerName;
.poweroff = cfg->autoShutdownPoweroff,
.waitShutdownSecs = cfg->autoShutdownWait,
.saveBypassCache = cfg->autoSaveBypassCache,
+ .autoRestore = cfg->autoShutdownRestore,
};
virDomainDriverAutoShutdown(&ascfg);
{ "auto_shutdown_try_shutdown" = "all" }
{ "auto_shutdown_poweroff" = "all" }
{ "auto_shutdown_wait" = "30" }
+{ "auto_shutdown_restore" = "1" }
{ "auto_save_bypass_cache" = "0" }
{ "hugetlbfs_mount" = "/dev/hugepages" }
{ "bridge_helper" = "qemu-bridge-helper" }