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

Re: [Xen-users] xendomains stop and gplpv network questions



On 18/02/13 22:20, Casey DeLorme wrote:
Hello Xen Users,

I have a couple of unrelated questions but didn't want to clutter everyones in-boxes with two emails.

---

1. Has anyone else been having trouble with the xendomains script?

I am running 4.2 stable on Debian Wheezy, and the xendomains script does not shut down my running domains (specifically two linux HVM's one with PVHVM).

When run manually via `service xendomains stop` or `/etc/init.d/xendomains stop` it returns a success message, but my machines continue to run as though nothing happened.

When I shut down my computer without running `xl destroy` on the running domains it locks up, my guess is because the domains are still running.

Has anyone else encountered this problem?

---


Xendomains is always horribly broken for me when using xl. I wrote a patch to fix it. I can't remember if I was getting exactly the same behaviour as you, but it is worth a try. This is using the script from the vanilla Xen sources, so I doubt it will patch against the Debian version. I can email the whole xendomains script off-list if you like, or it is pretty easy to mod by hand. I have one Dom0 based on Ubuntu 12.04 and another against Scientific Linux 6.3 with custom kernel and the same script works on both.

Whoever maintains the xendomains script must test it against an environment very alien to me!

My patch (untested against xm):-

--- xendomains.421      2012-12-17 15:00:34.000000000 +0000
+++ xendomains  2013-01-06 11:14:44.622409914 +0000
@@ -27,11 +27,13 @@
 #                    boots / shuts down.
 ### END INIT INFO

+HEADCOMP="LinuxGuestRecord"
 CMD=xm
 $CMD list &> /dev/null
 if test $? -ne 0
 then
        CMD=xl
+       HEADCOMP="Xen saved domain"
 fi

 $CMD list &> /dev/null
@@ -202,10 +204,10 @@
     done
 }

-LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":'
+LIST_GREP='((domain$\|(domid\|(name\|^{$\|"name":\|"domid":'
 parseln()
 {
-    if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then
+    if [[ "$1" = '(domain' ]] || [[ "$1" = "{" ]]; then
         name=;id=
     elif [[ "$1" =~ '(name' ]]; then
         name=$(echo $1 | sed -e 's/^.*(name \(.*\))$/\1/')
@@ -255,7 +257,7 @@
         for dom in $XENDOMAINS_SAVE/*; do
             if [ -f $dom ] ; then
                 HEADER=`head -c 16 $dom | head -n 1 2> /dev/null`
-                if [ $HEADER = "LinuxGuestRecord" ]; then
+                if [ "$HEADER" = "$HEADCOMP" ]; then
                     echo -n " ${dom##*/}"
                     XMR=`$CMD restore $dom 2>&1 1>/dev/null`
                     #$CMD restore $dom


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


 


Rackspace

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