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

Re: [Xen-users] Xen 4.2.2 /etc/init.d/xendomains save and restore of domains does not work

I download the file by from git and give him a chance. It works nearly perfect.
On xendomains stop there was all ok.

On xendomains start it restores the saved domains but after that it tries to start them again and produce some error messages like domain is already running.

It appears to be working fine for me. I am running 4.3 rc 6 + next commit. Rather than saying the output has changed for xl, I think you may be referring to the fact that xl now can output JSON as well as xm's SXP. Having said this, xendomains works both properly for me both using JSON and SXP although I am not sure why the skipping of the autostart domains is working when I select JSON in xl.conf. Certainly the xl ... sed line fails when I execute it manually when using JSON.

I think your solution is not the right approach because xl can produce JSON and SXP format and that is defined in xl.conf. Your solution will have a problem when setting xl to produce SXP, I think.

root@xen6:/etc/xen/auto# service xendomains stop
Shutting down Xen domains: ubuntu-email(save)................................
 *   [done]
root@xen6:/etc/xen/auto# service xendomains start
Restoring Xen domains: ubuntu-email vpn2
Starting auto Xen domains: ubuntu-email(skip) vpn2(skip) *   [done]

Not tested against xm as I have no means to do so.

The reason is  the sed script in rdname() does not work with xl output.
I'll changed it in the way as you have done with HEADCOMP (see the diff below).
After that all was nice for me

root@srv01:/etc/init.d# diff -u .xendomains.4.3.original xendomains
--- .xendomains.4.3.original    2013-06-30 20:54:14.000000000 +0200
+++ xendomains  2013-06-30 23:27:44.000000000 +0200
@@ -31,11 +31,13 @@

+RDNAMESED='s/^.*(name \(.*\))$/\1/p'
 $CMD list &> /dev/null
 if test $? -ne 0
        HEADCOMP="Xen saved domain"
+        RDNAMESED='s/^.*"name": "\(.*\)",$/\1/p'

 $CMD list &> /dev/null
@@ -185,8 +187,8 @@
 # read name from xen config file
-    NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-         sed -n 's/^.*(name \(.*\))$/\1/p')
+    NM=$( $CMD create --quiet --dryrun --defconfig "$1" |
+         sed -n "${RDNAMESED}" )


I am surprised you did not have issue with 4.2.1 because the header issues have been present ever since xl became the default/preferred toolstack, unless your Xen 4.2.1 came from a third-party.
Your are right I remember that there were some problems with 4.2.1 too. As I switched from 4.1 to 4.2.1.

Sorry at that time I had not much time. If I remember right, I fixed that in any way for me, but forget to report.

Thanks for your help. I learned a lot about bash (bla) seams to be equal to bla) in case instructions. That was new for me.

Best wishes


Xen-users mailing list

Xen-users mailing list



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