|
Last change
on this file since 3637 was 1535, checked in by Bruno Cornec, 18 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 | (
|
|---|
| 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 |
|
|---|
| 21 | if [ _"$1" = _"" ]; then
|
|---|
| 22 | echo "Syntax: restoreqemu vm"
|
|---|
| 23 | exit -1
|
|---|
| 24 | else
|
|---|
| 25 | m=$1
|
|---|
| 26 | fi
|
|---|
| 27 |
|
|---|
| 28 | demodir=/home/bruno/demo-mondo
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | QEMUOPT=" $QEMUOPT -kernel $demodir/k -initrd $demodir/i"
|
|---|
| 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"
|
|---|
| 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.