| str_entry "security_driver"
| str_entry "user"
| str_entry "group"
- | bool_entry "dynamic_ownership"
+ | bool_entry "dynamic_ownership"
| str_array_entry "cgroup_controllers"
| str_array_entry "cgroup_device_acl"
| str_entry "save_image_format"
| bool_entry "vnc_allow_host_audio"
| bool_entry "clear_emulator_capabilities"
| bool_entry "allow_disk_format_probing"
+ | bool_entry "set_process_name"
(* Each enty in the config is one of the following three ... *)
let entry = vnc_entry
# "/dev/rtc", "/dev/hpet", "/dev/net/tun",
#]
+
# The default format for Qemu/KVM guest save images is raw; that is, the
# memory from the domain is dumped out directly to a file. If you have
# guests with a large amount of memory, however, this can take up quite
#
# save_image_format = "raw"
+
# 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
#
# NB, within this mount point, guests will create memory backing files
# in a location of $MOUNTPOINT/libvirt/qemu
-
+#
# hugetlbfs_mount = "/dev/hugepages"
+
# mac_filter enables MAC addressed based filtering on bridge ports.
# This currently requires ebtables to be installed.
#
# mac_filter = 1
+
# By default, PCI devices below non-ACS switch are not allowed to be assigned
# to guests. By setting relaxed_acs_check to 1 such devices will be allowed to
# be assigned to guests.
#
# vnc_allow_host_audio = 0
+
# If clear_emulator_capabilities is enabled, libvirt will drop all
# privileged capabilities of the QEmu/KVM emulator. This is enabled by
# default.
# clear_emulator_capabilities = 1
-
# If allow_disk_format_probing is enabled, libvirt will probe disk
# images to attempt to identify their format, when not otherwise
# specified in the XML. This is disabled by default.
# deployments. It is strongly recommended that users update their
# guest XML <disk> elements to include <driver type='XXXX'/>
# elements instead of enabling this option.
+#
# allow_disk_format_probing = 1
+
+
+# If enabled, libvirt will have QEMU set its process name to
+# "qemu:VM_NAME", where VM_NAME is the name of the VM. The QEMU
+# process will appear as "qemu:VM_NAME" in process listings and
+# other system monitoring tools. By default, QEMU does not set
+# its process title, so the complete QEMU command (emulator and
+# its arguments) appear in process listings.
+#
+# set_process_name = 1
CHECK_TYPE ("allow_disk_format_probing", VIR_CONF_LONG);
if (p) driver->allowDiskFormatProbing = p->l;
+ p = virConfGetValue (conf, "set_process_name");
+ CHECK_TYPE ("set_process_name", VIR_CONF_LONG);
+ if (p) driver->setProcessName = p->l;
+
virConfFree (conf);
return 0;
}
flags |= QEMUD_CMD_FLAG_ENABLE_KVM;
if (strstr(help, "-no-reboot"))
flags |= QEMUD_CMD_FLAG_NO_REBOOT;
- if (strstr(help, "-name"))
+ if (strstr(help, "-name")) {
flags |= QEMUD_CMD_FLAG_NAME;
+ if (strstr(help, ",process="))
+ flags |= QEMUD_CMD_FLAG_NAME_PROCESS;
+ }
if (strstr(help, "-uuid"))
flags |= QEMUD_CMD_FLAG_UUID;
if (strstr(help, "-xen-domid"))
if (qemuCmdFlags & QEMUD_CMD_FLAG_NAME) {
ADD_ARG_LIT("-name");
- ADD_ARG_LIT(def->name);
+ if (driver->setProcessName &&
+ (qemuCmdFlags & QEMUD_CMD_FLAG_NAME_PROCESS)) {
+ char *name;
+ if (virAsprintf(&name, "%s,process=\"qemu:%s\"",
+ def->name, def->name) < 0)
+ goto no_memory;
+ ADD_ARG_LIT(name);
+ } else {
+ ADD_ARG_LIT(def->name);
+ }
}
if (qemuCmdFlags & QEMUD_CMD_FLAG_UUID) {
ADD_ARG_LIT("-uuid");
if (strstr(val, "menu=on"))
def->os.bootmenu = 1;
} else if (STREQ(arg, "-name")) {
+ char *process;
WANT_VALUE();
- if (!(def->name = strdup(val)))
- goto no_memory;
+ process = strstr(val, ",process=");
+ if (process == NULL) {
+ if (!(def->name = strdup(val)))
+ goto no_memory;
+ } else {
+ if (!(def->name = strndup(val, process - val)))
+ goto no_memory;
+ }
} else if (STREQ(arg, "-M")) {
WANT_VALUE();
if (!(def->os.machine = strdup(val)))
QEMUD_CMD_FLAG_ENABLE_KQEMU = (1LL << 39), /* -enable-kqemu flag */
QEMUD_CMD_FLAG_FSDEV = (1LL << 40), /* -fstype filesystem passthrough */
QEMUD_CMD_FLAG_NESTING = (1LL << 41), /* -enable-nesting (SVM/VMX) */
+ QEMUD_CMD_FLAG_NAME_PROCESS = (1LL << 42), /* Is -name process= available */
};
/* Main driver state */
unsigned int vncAllowHostAudio : 1;
unsigned int clearEmulatorCapabilities : 1;
unsigned int allowDiskFormatProbing : 1;
+ unsigned int setProcessName : 1;
virCapsPtr caps;
hugetlbfs_mount = \"/dev/hugepages\"
+set_process_name = 1
+
relaxed_acs_check = 1
vnc_allow_host_audio = 1
{ "#empty" }
{ "hugetlbfs_mount" = "/dev/hugepages" }
{ "#empty" }
+{ "set_process_name" = "1" }
+{ "#empty" }
{ "relaxed_acs_check" = "1" }
{ "#empty" }
{ "vnc_allow_host_audio" = "1" }
QEMUD_CMD_FLAG_NO_KVM_PIT |
QEMUD_CMD_FLAG_TDF |
QEMUD_CMD_FLAG_BOOT_MENU |
- QEMUD_CMD_FLAG_NESTING,
+ QEMUD_CMD_FLAG_NESTING |
+ QEMUD_CMD_FLAG_NAME_PROCESS,
10092, 1, 0);
DO_TEST("qemu-0.12.1",
QEMUD_CMD_FLAG_VNC_COLON |
QEMUD_CMD_FLAG_SMP_TOPOLOGY |
QEMUD_CMD_FLAG_RTC |
QEMUD_CMD_FLAG_NO_HPET |
- QEMUD_CMD_FLAG_BOOT_MENU,
+ QEMUD_CMD_FLAG_BOOT_MENU |
+ QEMUD_CMD_FLAG_NAME_PROCESS,
12001, 0, 0);
DO_TEST("qemu-kvm-0.12.3",
QEMUD_CMD_FLAG_VNC_COLON |
QEMUD_CMD_FLAG_NO_KVM_PIT |
QEMUD_CMD_FLAG_TDF |
QEMUD_CMD_FLAG_BOOT_MENU |
- QEMUD_CMD_FLAG_NESTING,
+ QEMUD_CMD_FLAG_NESTING |
+ QEMUD_CMD_FLAG_NAME_PROCESS,
12003, 1, 0);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;