summaryrefslogtreecommitdiffstats
authorRaghavendra D Prabhu <[email protected]>2011-07-23 19:44:37 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-07-23 19:44:37 (GMT)
commit7049258b951044e18e2e1c29e4afbb568f75a7b1 (patch) (unidiff)
tree637802e25bb4dff8b30000df0d1791108e93b60c
parentd4f519ffe7c7e9bdae704fcdc30d3e2a1cfb49dc (diff)
downloadScripts-7049258b951044e18e2e1c29e4afbb568f75a7b1.zip
Scripts-7049258b951044e18e2e1c29e4afbb568f75a7b1.tar.gz
Scripts-7049258b951044e18e2e1c29e4afbb568f75a7b1.tar.bz2
Scripts updateHEADmaster
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xarchievm15
1 files changed, 1 insertions, 14 deletions
diff --git a/archievm b/archievm
index c20b6c2..b37600d 100755
--- a/archievm
+++ b/archievm
@@ -1,11 +1,8 @@
1#!/bin/zsh 1#!/bin/zsh
2 2
3#[[ ! $(whoami) == 'root' ]] && exit 1
4#sudo modprobe -a -v kvm kvm_intel virtio virtio_pci virtio_balloon virtio_blk virtio_net virtio_console virtio_rng 9pnet_virtio
5#sudo modprobe -a -v kvm kvm_intel nbd
6lsmod | grep -q kvm_intel || { 3lsmod | grep -q kvm_intel || {
7 sudo modprobe -a -v kvm kvm_intel 4 sudo modprobe -a -v kvm kvm_intel
8} 5}
9debugk=0 6debugk=0
10nographic=1 7nographic=1
11mem=512 8mem=512
@@ -15,13 +12,12 @@ ksm=0
15console=0 12console=0
16runas="raghavendra" 13runas="raghavendra"
17DIR="/home/raghavendra/Arch/qemu" 14DIR="/home/raghavendra/Arch/qemu"
18bzImage="$DIR/kvmImage" 15bzImage="$DIR/kvmImage"
19image="/media/Sparowes/Virt/Archie.img" 16image="/media/Sparowes/Virt/Archie.img"
20soutput=1 17soutput=1
21#append="root=/dev/vda3"
22 18
23typeset -A args 19typeset -A args
24args=(d debugk c console n nographic g huge I bzImage t test s soutput) 20args=(d debugk c console n nographic g huge I bzImage t test s soutput)
25 21
26while getopts ':gn:dI:th' opt;do 22while getopts ':gn:dI:th' opt;do
27 case $opt in 23 case $opt in
@@ -61,15 +57,13 @@ if [[ $debugk == 1 ]];then
61 external=" -kernel $bzImage -initrd /boot/kernel26-.img -append \"root=/dev/vda3\" " 57 external=" -kernel $bzImage -initrd /boot/kernel26-.img -append \"root=/dev/vda3\" "
62 fi 58 fi
63fi 59fi
64 60
65if [[ $huge == 1 && $test == 0 ]];then 61if [[ $huge == 1 && $test == 0 ]];then
66 echo 148 | sudo tee /proc/sys/vm/nr_hugepages 62 echo 148 | sudo tee /proc/sys/vm/nr_hugepages
67 #hugearg=" -mem-path /media/hugepages -mem-prealloc "
68 hugearg=" -mem-path /media/hugepages " 63 hugearg=" -mem-path /media/hugepages "
69 #hugearg=" -mem-path /media/hugepages "
70fi 64fi
71 65
72if [[ $nographic == 1 ]];then 66if [[ $nographic == 1 ]];then
73 graph=" -daemonize -nographic " 67 graph=" -daemonize -nographic "
74else 68else
75 graph=" -vga std -sdl -no-frame" 69 graph=" -vga std -sdl -no-frame"
@@ -90,27 +84,20 @@ cmdline="qemu-kvm -name Archie -enable-kvm -s -monitor unix:$DIR/archie.sock,ser
90 -net nic,model=virtio,vlan=1 -net user,vlan=1,hostfwd=tcp:127.0.0.1:2222-:22 $=graph \ 84 -net nic,model=virtio,vlan=1 -net user,vlan=1,hostfwd=tcp:127.0.0.1:2222-:22 $=graph \
91 -virtfs local,path=$DIR/share,security_model=none,mount_tag=share \ 85 -virtfs local,path=$DIR/share,security_model=none,mount_tag=share \
92 -virtfs local,path=/var/cache/pacman/pkg,security_model=none,mount_tag=pacman \ 86 -virtfs local,path=/var/cache/pacman/pkg,security_model=none,mount_tag=pacman \
93 -virtfs local,path=/media/Corona/bldit/.gcov,security_model=none,mount_tag=gcov \ 87 -virtfs local,path=/media/Corona/bldit/.gcov,security_model=none,mount_tag=gcov \
94 $external -runas $runas $=EARGS" 88 $external -runas $runas $=EARGS"
95 89
96#echo "$cmdline" 90eval $=cmdline || exit 12
97#exit
98eval $=cmdline
99 91
100if [[ $ksm == 1 ]];then 92if [[ $ksm == 1 ]];then
101 echo 1 | sudo tee /sys/kernel/mm/ksm/run 93 echo 1 | sudo tee /sys/kernel/mm/ksm/run
102fi 94fi
103#sleep 5
104#sudo -u $runas sshfs -p 2222 [email protected]:/ /mnt-qemu
105sshfs -p 2222 [email protected]:/home/raghu/gcov /media/Corona/bldit/.gcov 95sshfs -p 2222 [email protected]:/home/raghu/gcov /media/Corona/bldit/.gcov
106#rlwrap -pgreen socat - $DIR/archie.sock
107if [[ $console == 1 ]];then 96if [[ $console == 1 ]];then
108 rlwrap socat - $DIR/archie.sock 97 rlwrap socat - $DIR/archie.sock
109else 98else
110 if [[ $nographic == 1 ]];then 99 if [[ $nographic == 1 ]];then
111 ssh -p 2222 [email protected] 100 ssh -p 2222 [email protected]
112 fi 101 fi
113fi 102fi
114#qemu-kvm -name Archie -enable-kvm -m 512 -snapshot -drive file=/media/Inkq/Virt/Archie.img,if=virtio -vga std -kernel ~/Arch/qemu/kvmImage -initrd /boot/kernel26.img -append root=/dev/vda3
115#qemu-kvm -name Archie -enable-kvm -m 512 -snapshot -hda /media/Inkq/Virt/Archie.img -vga std -kernel ~/Arch/qemu/kvmImage -initrd /boot/kernel26-wye.img -append "root=/dev/sda3 console=ttyS0 earlyprintk=serial,ttyS0" -serial file:/tmp/x.log#
116 103