| str_array_entry "cgroup_controllers"
| str_array_entry "cgroup_device_acl"
| str_entry "save_image_format"
+ | str_entry "dump_image_format"
| str_entry "hugetlbfs_mount"
| bool_entry "relaxed_acs_check"
| bool_entry "vnc_allow_host_audio"
# saving a domain in order to save disk space; the list above is in descending
# order by performance and ascending order by compression ratio.
#
+# save_image_format is used when you use 'virsh save' at scheduled saving.
+# dump_image_format is used when you use 'virsh dump' at emergency crashdump.
+#
# save_image_format = "raw"
+# dump_image_format = "raw"
# If provided by the host and a hugetlbfs mount point is configured,
}
}
+ p = virConfGetValue (conf, "dump_image_format");
+ CHECK_TYPE ("dump_image_format", VIR_CONF_STRING);
+ if (p && p->str) {
+ VIR_FREE(driver->dumpImageFormat);
+ if (!(driver->dumpImageFormat = strdup(p->str))) {
+ virReportOOMError();
+ virConfFree(conf);
+ return -1;
+ }
+ }
+
p = virConfGetValue (conf, "hugetlbfs_mount");
CHECK_TYPE ("hugetlbfs_mount", VIR_CONF_STRING);
if (p && p->str) {
virSecurityDriverPtr securitySecondaryDriver;
char *saveImageFormat;
+ char *dumpImageFormat;
pciDeviceList *activePciHostdevs;
int resume = 0, paused = 0;
int ret = -1, fd = -1;
virDomainEventPtr event = NULL;
- const char *args[] = {
- "cat",
- NULL,
- };
+ int compress;
qemuDomainObjPrivatePtr priv;
+ /*
+ * We reuse "save" flag for "dump" here. Then, we can support the same
+ * format in "save" and "dump".
+ */
+ compress = QEMUD_SAVE_FORMAT_RAW;
+ if (driver->dumpImageFormat) {
+ compress = qemudSaveCompressionTypeFromString(driver->dumpImageFormat);
+ if (compress < 0) {
+ qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ _("Invalid dump image format specified in "
+ "configuration file"));
+ return -1;
+ }
+ }
qemuDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
}
qemuDomainObjEnterMonitorWithDriver(driver, vm);
- ret = qemuMonitorMigrateToFile(priv->mon,
- QEMU_MONITOR_MIGRATE_BACKGROUND,
- args, path, 0);
+ if (compress == QEMUD_SAVE_FORMAT_RAW) {
+ const char *args[] = {
+ "cat",
+ NULL,
+ };
+ ret = qemuMonitorMigrateToFile(priv->mon,
+ QEMU_MONITOR_MIGRATE_BACKGROUND,
+ args, path, 0);
+ } else {
+ const char *prog = qemudSaveCompressionTypeToString(compress);
+ const char *args[] = {
+ prog,
+ "-c",
+ NULL,
+ };
+ ret = qemuMonitorMigrateToFile(priv->mon,
+ QEMU_MONITOR_MIGRATE_BACKGROUND,
+ args, path, 0);
+ }
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (ret < 0)
goto endjob;
save_image_format = \"gzip\"
+dump_image_format = \"gzip\"
+
hugetlbfs_mount = \"/dev/hugepages\"
set_process_name = 1
{ "#empty" }
{ "save_image_format" = "gzip" }
{ "#empty" }
+{ "dump_image_format" = "gzip" }
+{ "#empty" }
{ "hugetlbfs_mount" = "/dev/hugepages" }
{ "#empty" }
{ "set_process_name" = "1" }