diff options
author | 2022-05-17 15:49:07 +0800 | |
---|---|---|
committer | 2022-05-18 13:56:43 -0400 | |
commit | ee219556926be811ae24903c41e8bca9dfc7e511 (patch) | |
tree | 10acfe275da899045c518ee772a164409e75ebf4 | |
parent | 449be3ca727c1e2b6df839d9b09aa0adb8caadd7 (diff) | |
download | meta-virtualization-ee219556926be811ae24903c41e8bca9dfc7e511.tar.gz meta-virtualization-ee219556926be811ae24903c41e8bca9dfc7e511.tar.bz2 meta-virtualization-ee219556926be811ae24903c41e8bca9dfc7e511.zip |
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>
-rw-r--r-- | recipes-extended/libvirt/libvirt_8.1.0.bb | 5 |
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 f8deba4..89f82bf 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() { rmdir ${D}${prefix}/lib/systemd/system ${D}${prefix}/lib/systemd fi - # This variable is used by libvirtd.service to start libvirtd in the right mode - sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/init.d/libvirtd - # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. + # Change default LIBVIRTD_ARGS to start libvirtd in the right mode. sed -i -e 's/Type=notify/Type=forking/' \ -e '/Type=forking/a PIDFile=/run/libvirtd.pid' \ + -e 's/\(Environment=LIBVIRTD_ARGS="--timeout 120"\)/#\1\nEnvironment=LIBVIRTD_ARGS="--listen --daemon"/' \ ${D}/${systemd_system_unitdir}/libvirtd.service fi |