As requested by Mark Williamson in BZ #681 Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com> --- xendomains.orig 2006-06-17 14:35:48.000000000 +1000 +++ xendomains 2006-06-17 14:45:29.000000000 +1000 @@ -207,10 +207,11 @@ if [ "$XENDOMAINS_RESTORE" = "true" ] && contains_something "$XENDOMAINS_SAVE" then + XENDOMAINS_SAVED=`/bin/ls $XENDOMAINS_SAVE/* | grep -v ''lost+found''` mkdir -p $(dirname "$LOCKFILE") touch $LOCKFILE echo -n "Restoring Xen domains:" - for dom in $XENDOMAINS_SAVE/*; do + for dom in $XENDOMAINS_SAVED; do echo -n " ${dom##*/}" xm restore $dom if [ $? -ne 0 ]; then @@ -239,6 +240,7 @@ if is_running $dom; then echo -n "(skip)" else + echo "(booting)" xm create --quiet --defconfig $dom if [ $? -ne 0 ]; then rc_failed $? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark Williamson
2007-Jun-29 15:58 UTC
Re: [Xen-devel] [PATCH] Make xendomains ignore lost+found
> As requested by Mark Williamson in BZ #681 > > Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>Gawain, thanks for identifying this and patching it. This fixes a breakage on resume when the XENDOMAINS_SAVE directory is a separate partition. At some point it /might/ be nice to have more sophisticated checking of what is an suspend image, and what''s not. But this patch shouldn''t break anything, and should fix a user-visible bug for some people. Acked-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>> --- xendomains.orig 2006-06-17 14:35:48.000000000 +1000 > +++ xendomains 2006-06-17 14:45:29.000000000 +1000 > @@ -207,10 +207,11 @@ > if [ "$XENDOMAINS_RESTORE" = "true" ] && > contains_something "$XENDOMAINS_SAVE" > then > + XENDOMAINS_SAVED=`/bin/ls $XENDOMAINS_SAVE/* | grep -v ''lost+found''` > mkdir -p $(dirname "$LOCKFILE") > touch $LOCKFILE > echo -n "Restoring Xen domains:" > - for dom in $XENDOMAINS_SAVE/*; do > + for dom in $XENDOMAINS_SAVED; do > echo -n " ${dom##*/}" > xm restore $dom > if [ $? -ne 0 ]; then > @@ -239,6 +240,7 @@ > if is_running $dom; then > echo -n "(skip)" > else > + echo "(booting)" > xm create --quiet --defconfig $dom > if [ $? -ne 0 ]; then > rc_failed $? > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2007-Jun-29 16:13 UTC
Re: [Xen-devel] [PATCH] Make xendomains ignore lost+found
On Fri, Jun 29, 2007 at 04:58:18PM +0100, Mark Williamson wrote:> > As requested by Mark Williamson in BZ #681 > > > > Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com> > > Gawain, thanks for identifying this and patching it. > > This fixes a breakage on resume when the XENDOMAINS_SAVE directory is a > separate partition. > > At some point it /might/ be nice to have more sophisticated checking of what > is an suspend image, and what''s not. But this patch shouldn''t break > anything, and should fix a user-visible bug for some people.You can read the first 16 bytes of the file & check they are ''LinuxGuestRecord''. This is the sanity check we do in virt-manager when user asks us to restore a VM from saved image. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gawain Lynch
2007-Jun-30 01:07 UTC
Re: [Xen-devel] [PATCH] Make xendomains ignore lost+found
On 30/06/07, Daniel P. Berrange <berrange@redhat.com> wrote:> You can read the first 16 bytes of the file & check they are ''LinuxGuestRecord''. > This is the sanity check we do in virt-manager when user asks us to restore > a VM from saved image.OK based on Dan''s suggestion here is an improved patch. Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Apparently Analagous Threads
- Bug#772274: xen-utils-common: when upgrading package: insserv: Service xenstored has to be enabled to start service xendomains
- [Patch[ xl problems with xendomains
- Xendomains always broken for me, nobody else?
- Xen 4.2.2 /etc/init.d/xendomains save and restore of domains does not work
- DomU suspension/hibernation