SHA256
1
0
forked from pool/libvirt
libvirt/relax-qemu-usergroup-check.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

Allow qemu driver (and hence libvirtd) to load when qemu
user:group does not exist. The kvm package, which may not
exist on a xen host, creates qemu user:group.
A better (future) solution would be to build the libvirtd
drivers as loadable modules instead of built-in to the
daemon. Then the qemu driver would only be loaded when needed,
which would never be the case on a xen-only configuration.
Index: libvirt-1.0.1/src/qemu/qemu_conf.c
===================================================================
--- libvirt-1.0.1.orig/src/qemu/qemu_conf.c
+++ libvirt-1.0.1/src/qemu/qemu_conf.c
@@ -252,7 +252,7 @@ int qemuLoadDriverConfig(virQEMUDriverPt
goto no_memory;
if (virGetUserID(user, &driver->user) < 0)
- goto cleanup;
+ VIR_WARN("User %s does not exist! Continuing...", user);
p = virConfGetValue(conf, "group");
CHECK_TYPE("group", VIR_CONF_STRING);
@@ -260,7 +260,7 @@ int qemuLoadDriverConfig(virQEMUDriverPt
goto no_memory;
if (virGetGroupID(group, &driver->group) < 0)
- goto cleanup;
+ VIR_WARN("Group %s does not exist! Continuing...", group);
GET_VALUE_LONG("dynamic_ownership", driver->dynamicOwnership);