source: branches/stable/tools/restoreqemu @ 3656

Last change on this file since 3656 was 1535, checked in by Bruno Cornec, 13 years ago

Use the configuration files in mondo (begining). That revision doesn't even compile.

  • Property svn:executable set to *
File size: 779 bytes
Line 
1#!/bin/bash
2#
3# $Id$
4#
5# Restore virtual machine with qemu
6#
7
8(
9dname=`dirname $0`
10prem=`echo $dname |cut -c1`
11if [ _${prem} = _"/" ]; then
12        export TOOLHOME=$dname
13else
14        export TOOLHOME=${PWD}/$dname
15fi
16
17. $TOOLHOME/common-env
18. $TOOLHOME/distro-env
19. $TOOLHOME/qemu-env
20
21if [ _"$1" = _"" ]; then
22    echo "Syntax: restoreqemu vm"
23    exit -1
24else
25    m=$1
26fi
27
28demodir=/home/bruno/demo-mondo
29
30
31QEMUOPT=" $QEMUOPT -kernel $demodir/k -initrd $demodir/i"
32QEMUAPP="load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=65536 rw root=/dev/ram iso_mode pxe prefix=test-mondo-$m ipconf=eth0:dhcp nfsmount=10.0.2.2:$demodir"
33
34cp $demodir/pxe.qemu $demodir/test.qemu
35$qemucmd -m 256 $QEMUOPT -append "$QEMUAPP" -redir tcp:${sp}:${ipvm}:22 $demodir/test.qemu
36) 2>&1 | tee /tmp/restoreqemu.log
Note: See TracBrowser for help on using the repository browser.