Last change
on this file since 3461 was 1535, checked in by Bruno Cornec, 17 years ago |
Use the configuration files in mondo (begining). That revision doesn't even compile.
|
-
Property svn:executable
set to
*
|
File size:
779 bytes
|
Rev | Line | |
---|
[1334] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | # Restore virtual machine with qemu
|
---|
| 6 | #
|
---|
| 7 |
|
---|
| 8 | (
|
---|
| 9 | dname=`dirname $0`
|
---|
| 10 | prem=`echo $dname |cut -c1`
|
---|
| 11 | if [ _${prem} = _"/" ]; then
|
---|
| 12 | export TOOLHOME=$dname
|
---|
| 13 | else
|
---|
| 14 | export TOOLHOME=${PWD}/$dname
|
---|
| 15 | fi
|
---|
| 16 |
|
---|
| 17 | . $TOOLHOME/common-env
|
---|
| 18 | . $TOOLHOME/distro-env
|
---|
| 19 | . $TOOLHOME/qemu-env
|
---|
| 20 |
|
---|
[1535] | 21 | if [ _"$1" = _"" ]; then
|
---|
| 22 | echo "Syntax: restoreqemu vm"
|
---|
| 23 | exit -1
|
---|
| 24 | else
|
---|
| 25 | m=$1
|
---|
| 26 | fi
|
---|
| 27 |
|
---|
[1334] | 28 | demodir=/home/bruno/demo-mondo
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | QEMUOPT=" $QEMUOPT -kernel $demodir/k -initrd $demodir/i"
|
---|
[1535] | 32 | QEMUAPP="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"
|
---|
[1334] | 33 |
|
---|
| 34 | cp $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.