WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] stubdom: support save/restore

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] stubdom: support save/restore
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Tue, 11 Mar 2008 17:46:11 +0000
Delivery-date: Tue, 11 Mar 2008 11:14:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
stubdom: support save/restore
by passing the -loadvm parameter, letting the stubdomain access the save
area, and having it watch the correct xenstore node.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 86e64b684fb2 stubdom/stubdom-dm
--- a/stubdom/stubdom-dm        Wed Mar 05 11:10:29 2008 +0000
+++ b/stubdom/stubdom-dm        Tue Mar 11 17:43:43 2008 +0000
@@ -14,18 +14,30 @@ domname=
 domname=
 vncviewer=0
 vncpid=
+extra=
 while [ "$#" -gt 0 ];
 do
     if [ "$#" -ge 2 ];
     then
        case "$1" in
-           -d) domid=$2; shift ;;
-           -domain-name) domname=$2; shift ;;
+           -d)
+                domid=$2;
+                extra="$extra -d $domid";
+                shift
+                ;;
+           -domain-name)
+                domname=$2;
+                shift
+                ;;
            -vnc)
                ip=${2%:*};
                vnc_port=${2#*:};
                shift
                ;;
+            -loadvm)
+                extra="$extra -loadvm $2";
+                shift
+                ;;
        esac
     fi
     case "$1" in
@@ -60,7 +72,7 @@ do
        sleep 1
 done
 
-creation="xm create -c stubdom-$domname target=$domid memory=32"
+creation="xm create -c stubdom-$domname target=$domid memory=32 
extra=\"$extra\""
 
 (while true ; do sleep 60 ; done) | $creation &
 #xterm -geometry +0+0 -e /bin/sh -c "$creation ; echo ; echo press ENTER to 
shut down ; read" &
diff -r 9ac1d76dcbdd stubdom/README
--- a/stubdom/README    Tue Mar 11 17:40:16 2008 +0000
+++ b/stubdom/README    Tue Mar 11 17:42:20 2008 +0000
@@ -78,6 +78,8 @@ To run
 
 mkdir -p /exports/usr/share/qemu
 ln -s /usr/share/qemu/keymaps /exports/usr/share/qemu
+mkdir -p /exports/var/lib
+ln -s /var/lib/xen /exports/var/lib
 /usr/sbin/fs-backend &
 
 xm create hvmconfig
diff -r 9ac1d76dcbdd tools/ioemu/xenstore.c
--- a/tools/ioemu/xenstore.c    Tue Mar 11 17:40:16 2008 +0000
+++ b/tools/ioemu/xenstore.c    Tue Mar 11 17:42:20 2008 +0000
@@ -81,7 +81,7 @@ static void waitForDevice(char *fn)
 
 #define DIRECT_PCI_STR_LEN 160
 char direct_pci_str[DIRECT_PCI_STR_LEN];
-void xenstore_parse_domain_config(int domid)
+void xenstore_parse_domain_config(int hvm_domid)
 {
     char **e = NULL;
     char *buf = NULL, *path;
@@ -100,7 +100,7 @@ void xenstore_parse_domain_config(int do
         return;
     }
 
-    path = xs_get_domain_path(xsh, domid);
+    path = xs_get_domain_path(xsh, hvm_domid);
     if (path == NULL) {
         fprintf(logfile, "xs_get_domain_path() error\n");
         goto out;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] stubdom: support save/restore, Samuel Thibault <=