summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2022-05-17 15:49:07 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-05-18 13:52:14 -0400
commitb7e56624053b1abf0b7e34a401838d36fe7f1d38 (patch)
tree10acfe275da899045c518ee772a164409e75ebf4 /recipes-extended
parentc578929ca3910e78a2b5876c70749520791124ee (diff)
downloadmeta-virtualization-b7e56624053b1abf0b7e34a401838d36fe7f1d38.tar.gz
libvirt: Fix keeping restarting
LIBVIRTD_ARGS has been moved to libvirtd.service since v8.1.0. Move our mode setting accordingly, otherwise libvirt would keep restarting and VMs would be constantly stopped. Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/libvirt/libvirt_8.1.0.bb5
1 files changed, 2 insertions, 3 deletions
diff --git a/recipes-extended/libvirt/libvirt_8.1.0.bb b/recipes-extended/libvirt/libvirt_8.1.0.bb
index f8deba45..89f82bf8 100644
--- a/recipes-extended/libvirt/libvirt_8.1.0.bb
+++ b/recipes-extended/libvirt/libvirt_8.1.0.bb
@@ -208,12 +208,11 @@ do_install:append() {
208 rmdir ${D}${prefix}/lib/systemd/system ${D}${prefix}/lib/systemd 208 rmdir ${D}${prefix}/lib/systemd/system ${D}${prefix}/lib/systemd
209 fi 209 fi
210 210
211 # This variable is used by libvirtd.service to start libvirtd in the right mode
212 sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/init.d/libvirtd
213
214 # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. 211 # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
212 # Change default LIBVIRTD_ARGS to start libvirtd in the right mode.
215 sed -i -e 's/Type=notify/Type=forking/' \ 213 sed -i -e 's/Type=notify/Type=forking/' \
216 -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ 214 -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \
215 -e 's/\(Environment=LIBVIRTD_ARGS="--timeout 120"\)/#\1\nEnvironment=LIBVIRTD_ARGS="--listen --daemon"/' \
217 ${D}/${systemd_system_unitdir}/libvirtd.service 216 ${D}/${systemd_system_unitdir}/libvirtd.service
218 fi 217 fi
219 218