|
@@ -24,9 +24,7 @@ LIBVIRT_CONF_OPTS = \
|
|
|
-Ddriver_hyperv=disabled \
|
|
|
-Ddriver_interface=enabled \
|
|
|
-Ddriver_libxl=disabled \
|
|
|
- -Ddriver_lxc=disabled \
|
|
|
-Ddriver_openvz=disabled \
|
|
|
- -Ddriver_qemu=disabled \
|
|
|
-Ddriver_remote=enabled \
|
|
|
-Ddriver_secrets=enabled \
|
|
|
-Ddriver_vbox=disabled \
|
|
@@ -193,6 +191,19 @@ else
|
|
|
LIBVIRT_CONF_OPTS += -Dssh2=disabled
|
|
|
endif
|
|
|
|
|
|
+ifeq ($(BR2_PACKAGE_LIBVIRT_LXC),y)
|
|
|
+LIBVIRT_CONF_OPTS += -Dlogin_shell=enabled -Ddriver_lxc=enabled
|
|
|
+LIBVIRT_DEPENDENCIES += lxc
|
|
|
+else
|
|
|
+LIBVIRT_CONF_OPTS += -Dlogin_shell=disabled -Ddriver_lxc=disabled
|
|
|
+endif
|
|
|
+
|
|
|
+ifeq ($(BR2_PACKAGE_LIBVIRT_QEMU),y)
|
|
|
+LIBVIRT_CONF_OPTS += -Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=kvm
|
|
|
+else
|
|
|
+LIBVIRT_CONF_OPTS += -Ddriver_qemu=disabled -Dqemu_user=no -Dqemu_group=no
|
|
|
+endif
|
|
|
+
|
|
|
else # BR2_PACKAGE_LIBVIRT_DAEMON
|
|
|
|
|
|
LIBVIRT_CONF_OPTS += -Dlibvirtd=disabled -Ddriver_network=disabled
|
|
@@ -218,13 +229,29 @@ define LIBVIRT_PERMISSIONS
|
|
|
/var/lib/libvirt/filesystems d 711 root root - - - - -
|
|
|
/var/lib/libvirt/images d 711 root root - - - - -
|
|
|
/var/lib/libvirt/network d 700 root root - - - - -
|
|
|
+ /var/lib/libvirt/qemu d 751 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/autostart d 700 root root - - - - -
|
|
|
+ /var/lib/libvirt/qemu/networks d 700 root root - - - - -
|
|
|
+ /var/lib/libvirt/qemu/networks/autostart d 700 root root - - - - -
|
|
|
+ /var/lib/libvirt/qemu/channel d 755 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/channel/target d 755 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/dump d 755 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/nvram d 755 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/save d 755 qemu kvm - - - - -
|
|
|
+ /var/lib/libvirt/qemu/snapshot d 755 qemu kvm - - - - -
|
|
|
/var/lib/libvirt/secrets d 700 root root - - - - -
|
|
|
/var/lib/libvirt/storage d 755 root root - - - - -
|
|
|
/var/lib/libvirt/storage/autostart d 755 root root - - - - -
|
|
|
/var/cache/libvirt d 711 root root - - - - -
|
|
|
+ /var/cache/libvirt/lxc d 750 root root - - - - -
|
|
|
+ /var/cache/libvirt/qemu d 750 qemu kvm - - - - -
|
|
|
+ /var/cache/libvirt/qemu/capabilities d 755 root root - - - - -
|
|
|
/var/log/libvirt d 700 root root - - - - -
|
|
|
+ /var/log/libvirt/lxc d 750 root root - - - - -
|
|
|
+ /var/log/libvirt/qemu d 750 root root - - - - -
|
|
|
/var/log/swtpm d 755 root root - - - - -
|
|
|
/var/log/swtpm/libvirt d 755 root root - - - - -
|
|
|
+ /var/log/swtpm/libvirt/qemu d 711 root root - - - - -
|
|
|
endef
|
|
|
|
|
|
# libvirt may need to create persistent files (e.g. VM definitions) in these
|
|
@@ -235,14 +262,22 @@ endef
|
|
|
define LIBVIRT_CREATE_SYMLINKS
|
|
|
$(INSTALL) -m 700 -d $(TARGET_DIR)/etc/libvirt
|
|
|
$(INSTALL) -m 755 -d $(TARGET_DIR)/var/lib/libvirt
|
|
|
+ $(INSTALL) -m 751 -d $(TARGET_DIR)/var/lib/libvirt/qemu
|
|
|
$(INSTALL) -m 700 -d $(TARGET_DIR)/var/lib/libvirt/secrets
|
|
|
$(INSTALL) -m 755 -d $(TARGET_DIR)/var/lib/libvirt/storage
|
|
|
+ ln -s -f ../../var/lib/libvirt/qemu $(TARGET_DIR)/etc/libvirt/
|
|
|
ln -s -f ../../var/lib/libvirt/secrets $(TARGET_DIR)/etc/libvirt/
|
|
|
ln -s -f ../../var/lib/libvirt/storage $(TARGET_DIR)/etc/libvirt/
|
|
|
endef
|
|
|
|
|
|
LIBVIRT_PRE_INSTALL_TARGET_HOOKS += LIBVIRT_CREATE_SYMLINKS
|
|
|
|
|
|
+ifeq ($(BR2_PACKAGE_LIBVIRT_QEMU),y)
|
|
|
+define LIBVIRT_USERS
|
|
|
+ qemu -1 kvm -1 * - - - Libvirt qemu/kvm daemon
|
|
|
+endef
|
|
|
+endif
|
|
|
+
|
|
|
ifeq ($(BR2_PACKAGE_LIBVIRT_DAEMON),y)
|
|
|
define LIBVIRT_INSTALL_INIT_SYSV
|
|
|
$(INSTALL) -D -m 0755 package/libvirt/S91virtlogd $(TARGET_DIR)/etc/init.d/S91virtlogd
|