From b414c718ca898d15157b50174cb9c99ef8ae0c5f Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 5 Nov 2018 09:52:13 +0000 Subject: [PATCH] Try changing the cwd for libvirt to pick bios --- snap-wrappers/libvirtd/launch-libvirtd | 6 ++++++ snapcraft.yaml | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 snap-wrappers/libvirtd/launch-libvirtd diff --git a/snap-wrappers/libvirtd/launch-libvirtd b/snap-wrappers/libvirtd/launch-libvirtd new file mode 100755 index 0000000..8e5a54d --- /dev/null +++ b/snap-wrappers/libvirtd/launch-libvirtd @@ -0,0 +1,6 @@ +#!/bin/sh -e + +# Workaround to ensure BIOS can be loaded +cd $SNAP/qemu + +exec "$SNAP/sbin/libvirtd" diff --git a/snapcraft.yaml b/snapcraft.yaml index 151ef52..e303100 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -215,10 +215,17 @@ apps: # Libvirt/Qemu libvirt-bin: - command: sbin/libvirtd + command: launch-libvirtd daemon: simple + environment: + LD_LIBRARY_PATH: $SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET + PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH + LC_ALL: C virsh: command: virsh + environment: + PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH + LC_ALL: C # MySQL # MySQL @@ -605,6 +612,14 @@ parts: # * is not used to avoid directory merge conflicts snap/microstack/current/: ./ + libvirtd-wrapper: + source: ./snap-wrappers/libvirtd + plugin: dump + after: + - libvirt + organize: + launch-libvirtd: bin/launch-libvirtd + # MySQL mysql-server: plugin: dump