# As a special case it can be set to the string "unlimited" to
# to allow arbitrarily sized core dumps.
#
-# By default the core dump size is set to 0 disabling all dumps
+# By default the core dump size is set to unlimited on
+# Linux where 'dump_guest_core' defaults to false, and
+# is set to 0 on other platforms, disabling all dumps
#
# Size is a positive integer specifying bytes or the
# string "unlimited"
#max_core = "unlimited"
# Determine if guest RAM is included in QEMU core dumps. By
-# default guest RAM will be excluded if a new enough QEMU is
-# present and host kernel supports it. Setting this to '1' will
+# default guest RAM will be excluded on Linux platforms,
+# and included on all other patforms. Setting this to '1' will
# force guest RAM to always be included in QEMU core dumps.
#
# This setting will be ignored if the guest XML has set the
cfg->deprecationBehavior = g_strdup("none");
cfg->storageUseNbdkit = USE_NBDKIT_DEFAULT;
-#ifndef MADV_DONTDUMP
+#ifdef MADV_DONTDUMP
+ cfg->maxCore = ULLONG_MAX;
+#else
/* QEMU uses Linux extensions to madvise() (MADV_DODUMP/MADV_DONTDUMP) to
- * include/exclude guest memory from core dump. These might be unavailable
- * on some systems. Provide sane default. */
+ * include/exclude guest memory from core dump. On non-Linux systems
+ * core dumps will unavoidably include all guest RAM, so toggle the
+ * default to reflect this and warn the admin.
+ */
VIR_INFO("Host kernel doesn't support MADV_DONTDUMP. Enabling dump_guest_core");
cfg->dumpGuestCore = true;
#endif