source: branches/stable/tools/restoreqemu @ 1334

Last change on this file since 1334 was 1334, checked in by bruno, 12 years ago
  • Add a test env (local for laptop + QEMU based)
  • creates qemu-env for reuse of code
  • Property svn:executable set to *
File size: 704 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
21demodir=/home/bruno/demo-mondo
22
23
24QEMUOPT=" $QEMUOPT -kernel $demodir/k -initrd $demodir/i"
25QEMUAPP="load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=65536 rw root=/dev/ram iso_mode nuke pxe prefix=test-mondo-$m ipconf=eth0:dhcp nfsmount=10.0.2.2:$demodir"
26
27cp $demodir/pxe.qemu $demodir/test.qemu
28$qemucmd -m 256 $QEMUOPT -append "$QEMUAPP" -redir tcp:${sp}:${ipvm}:22 $demodir/test.qemu
29) 2>&1 | tee /tmp/restoreqemu.log
Note: See TracBrowser for help on using the repository browser.