| str_entry "save_image_format"
| str_entry "dump_image_format"
| str_entry "auto_dump_path"
+ | bool_entry "auto_dump_bypass_cache"
+ | bool_entry "auto_start_bypass_cache"
| str_entry "hugetlbfs_mount"
| bool_entry "relaxed_acs_check"
| bool_entry "vnc_allow_host_audio"
#
# auto_dump_path = "/var/lib/libvirt/qemu/dump"
+# When a domain is configured to be auto-dumped, enabling this flag
+# has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the
+# virDomainCoreDump API. That is, the system will avoid using the
+# file system cache while writing the dump file, but may cause
+# slower operation.
+#
+# auto_dump_bypass_cache = 0
+
+# When a domain is configured to be auto-started, enabling this flag
+# has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag
+# with the virDomainCreateWithFlags API. That is, the system will
+# avoid using the file system cache when restoring any managed state
+# file, but may cause slower operation.
+#
+# auto_start_bypass_cache = 0
+
# If provided by the host and a hugetlbfs mount point is configured,
# a guest may request huge page backing. When this mount point is
# unspecified here, determination of a host mount point in /proc/mounts
/*
* qemu_conf.c: QEMU configuration management
*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
+ * Copyright (C) 2006-2011 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
}
}
+ p = virConfGetValue (conf, "auto_dump_bypass_cache");
+ CHECK_TYPE ("auto_dump_bypass_cache", VIR_CONF_LONG);
+ if (p) driver->autoDumpBypassCache = true;
+
+ p = virConfGetValue (conf, "auto_start_bypass_cache");
+ CHECK_TYPE ("auto_start_bypass_cache", VIR_CONF_LONG);
+ if (p) driver->autoStartBypassCache = true;
+
p = virConfGetValue (conf, "hugetlbfs_mount");
CHECK_TYPE ("hugetlbfs_mount", VIR_CONF_STRING);
if (p && p->str) {
/*
* qemu_conf.h: QEMU configuration management
*
- * Copyright (C) 2006-2007, 2009-2010 Red Hat, Inc.
+ * Copyright (C) 2006-2007, 2009-2011 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
char *dumpImageFormat;
char *autoDumpPath;
+ bool autoDumpBypassCache;
+
+ bool autoStartBypassCache;
pciDeviceList *activePciHostdevs;
vm->def->name,
err ? err->message : _("unknown error"));
} else {
- /* XXX need to wire bypass-cache autostart into qemu.conf */
if (vm->autostart &&
!virDomainObjIsActive(vm) &&
qemuDomainObjStart(data->conn, data->driver, vm,
- false, false, false) < 0) {
+ false, false,
+ data->driver->autoStartBypassCache) < 0) {
err = virGetLastError();
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
vm->def->name,
goto endjob;
}
- /* XXX wire up qemu.conf to support bypass-cache dumps */
ret = doCoreDump(driver, wdEvent->vm, dumpfile,
- getCompressionType(driver), false);
+ getCompressionType(driver),
+ driver->autoDumpBypassCache);
if (ret < 0)
qemuReportError(VIR_ERR_OPERATION_FAILED,
"%s", _("Dump failed"));