|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] build: use correct qemu path in systemd service file and init script
When --with-system-qemu is used, it is possible that we cannot find
qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons
init script and xen-qemu-dom0-disk-backend.service systemd service.
Signed-off-by: Ting-Wei Lan <lantw44@xxxxxxxxx>
---
tools/configure | 11 +++++++++++
tools/configure.ac | 6 ++++++
tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 2 +-
tools/hotplug/Linux/init.d/xencommons.in | 2 +-
.../Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +-
5 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/tools/configure b/tools/configure
index 2fa7426..c7ac612 100755
--- a/tools/configure
+++ b/tools/configure
@@ -695,6 +695,7 @@ PREPEND_INCLUDES
EXTRA_QEMUU_CONFIGURE_ARGS
ovmf_path
seabios_path
+qemu_xen_path_service
qemu_xen
rombios
qemu_traditional
@@ -4168,6 +4169,16 @@ _ACEOF
fi
+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"; then :
+
+ qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+
+else
+
+ qemu_xen_path_service="$withval"
+
+fi
+
diff --git a/tools/configure.ac b/tools/configure.ac
index b7f1513..3bb2b8b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -199,7 +199,13 @@ AC_ARG_WITH([system-qemu],
AS_IF([test "x$qemu_xen" = "xn"], [
AC_DEFINE_UNQUOTED([QEMU_XEN_PATH], ["$qemu_xen_path"], [Qemu Xen path])
])
+AS_IF([test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" = "xqemu"], [
+ qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"
+], [
+ qemu_xen_path_service="$withval"
+])
AC_SUBST(qemu_xen)
+AC_SUBST(qemu_xen_path_service)
AC_ARG_WITH([system-seabios],
AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index c12fc8a..770ba90 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -39,4 +39,4 @@
#XENBACKENDD_DEBUG=[yes|on|1]
# qemu path
-#QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386
+#QEMU_XEN=@qemu_xen_path_service@
diff --git a/tools/hotplug/Linux/init.d/xencommons.in
b/tools/hotplug/Linux/init.d/xencommons.in
index a1095c2..b501aaf 100644
--- a/tools/hotplug/Linux/init.d/xencommons.in
+++ b/tools/hotplug/Linux/init.d/xencommons.in
@@ -98,7 +98,7 @@ do_start () {
test -z "$XENCONSOLED_TRACE" || XENCONSOLED_ARGS="
--log=$XENCONSOLED_TRACE"
${SBINDIR}/xenconsoled --pid-file=$XENCONSOLED_PIDFILE $XENCONSOLED_ARGS
echo Starting QEMU as disk backend for dom0
- test -z "$QEMU_XEN" && QEMU_XEN="${LIBEXEC_BIN}/qemu-system-i386"
+ test -z "$QEMU_XEN" && QEMU_XEN="@qemu_xen_path_service@"
$QEMU_XEN -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv
-daemonize \
-monitor /dev/null -serial /dev/null -parallel /dev/null \
-pidfile $QEMU_PIDFILE
diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
index 274cec0..a8e2ca0 100644
--- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
+++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
@@ -11,7 +11,7 @@ Type=simple
PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid
ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
-ExecStart=@LIBEXEC_BIN@/qemu-system-i386 -xen-domid 0 \
+ExecStart=@qemu_xen_path_service@ -xen-domid 0 \
-xen-attach -name dom0 -nographic -M xenpv -daemonize \
-monitor /dev/null -serial /dev/null -parallel /dev/null \
-pidfile @XEN_RUN_DIR@/qemu-dom0.pid
--
2.4.3
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |