source:
MondoRescue/branches/2.2.4/tools/mkqemu@
2812
Last change on this file since 2812 was 1490, checked in by , 17 years ago | |
---|---|
|
|
File size: 551 bytes |
Rev | Line | |
---|---|---|
[440] | 1 | #!/bin/bash |
2 | # | |
3 | # $Id$ | |
4 | # | |
[556] | 5 | # Call virtual machine with qemu |
[440] | 6 | # |
7 | ||
[1475] | 8 | if [ _"$1" = _"" ]; then |
[556] | 9 | echo "Syntax: qemu vm" |
[440] | 10 | exit -1 |
11 | else | |
[556] | 12 | m=$1 |
[440] | 13 | fi |
14 | ||
[445] | 15 | ipvm=10.0.2.15 |
[440] | 16 | |
[603] | 17 | if [ _"$sp" = _"" ]; then |
18 | sp=2223 | |
19 | fi | |
20 | ||
[899] | 21 | ARCH=`/bin/arch` |
[1490] | 22 | if [ $ARCH = "x86_64" ]; then |
23 | qemucmd32=/usr/bin/qemu-system-i386 | |
24 | qemucmd64=/usr/bin/qemu | |
[899] | 25 | else |
[1490] | 26 | qemucmd32=/usr/bin/qemu |
27 | qemucmd64=/usr/bin/qemu-system-x86_64 | |
[899] | 28 | fi |
29 | ||
30 | echo $m | grep -q '_64$' | |
31 | if [ $? -ne 0 ]; then | |
32 | qemucmd=$qemucmd32 | |
33 | else | |
[1470] | 34 | qemucmd="$qemucmd64 -no-kqemu" |
[899] | 35 | fi |
36 | $qemucmd -m 256 $QEMUOPT -redir tcp:${sp}:${ipvm}:22 /users/qemu/$m.qemu |
Note:
See TracBrowser
for help on using the repository browser.