[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [xen stable-4.4] xend: Stop QEMU for dom0 using xend toolstack



It is useless QEMUs started up for Dom0 when using the xend toolstack

Signed-off-by: Yi Li <peteryili@xxxxxxxxxxx>
---
 tools/hotplug/Linux/init.d/xend |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/hotplug/Linux/init.d/xend b/tools/hotplug/Linux/init.d/xend
index 8921383..bd85004 100755
--- a/tools/hotplug/Linux/init.d/xend
+++ b/tools/hotplug/Linux/init.d/xend
@@ -22,6 +22,7 @@

 shopt -s extglob

+QEMU_PIDFILE=/var/run/qemu-dom0.pid
 # Wait for Xend to be up
 function await_daemons_up
 {
@@ -56,6 +57,13 @@ case "$1" in
     fi
     ${SBINDIR}/xend start
     await_daemons_up
+
+    if read 2>/dev/null <$QEMU_PIDFILE pid; then
+        echo "Stopping QEMU For dom0 when using xend toolstack"
+        kill $pid
+        while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+        rm -f $QEMU_PIDFILE
+    fi
     ;;
   stop)
     ${SBINDIR}/xend stop
-- 
1.7.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.