| str_entry "security_driver"
| str_entry "user"
| str_entry "group"
+ | bool_entry "dynamic_ownership"
| str_array_entry "cgroup_controllers"
| str_array_entry "cgroup_device_acl"
| str_entry "save_image_format"
# The group ID for QEMU processes run by the system instance
#group = "root"
+# Whether libvirt should dynamically change file ownership
+# to match the configured user/group above. Defaults to 1.
+# Set to 0 to disable file ownership changes.
+#dynamic_ownership = 1
+
# What cgroup controllers to make use of with QEMU guests
#
char *group;
int i;
- /* Setup 2 critical defaults */
+ /* Setup critical defaults */
+ driver->dynamicOwnership = 1;
+
if (!(driver->vncListen = strdup("127.0.0.1"))) {
virReportOOMError(NULL);
return -1;
}
VIR_FREE(user);
+
p = virConfGetValue (conf, "group");
CHECK_TYPE ("group", VIR_CONF_STRING);
if (!(group = strdup(p && p->str ? p->str : QEMU_GROUP))) {
virConfFree(conf);
return -1;
}
-
-
if (virGetGroupID(NULL, group, &driver->group) < 0) {
VIR_FREE(group);
virConfFree(conf);
}
VIR_FREE(group);
+
+ p = virConfGetValue (conf, "dynamic_ownership");
+ CHECK_TYPE ("dynamic_ownership", VIR_CONF_LONG);
+ if (p) driver->dynamicOwnership = p->l;
+
+
p = virConfGetValue (conf, "cgroup_controllers");
CHECK_TYPE ("cgroup_controllers", VIR_CONF_LIST);
if (p) {
group = \"root\"
+dynamic_ownership = 1
+
cgroup_controllers = [ \"cpu\", \"devices\" ]
cgroup_device_acl = [ \"/dev/null\", \"/dev/full\", \"/dev/zero\" ]
{ "#empty" }
{ "group" = "root" }
{ "#empty" }
+{ "dynamic_ownership" = "1" }
+{ "#empty" }
{ "cgroup_controllers"
{ "1" = "cpu" }
{ "2" = "devices" }