summaryrefslogtreecommitdiff
path: root/bin/vm
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2021-04-10 14:15:57 +0200
committerMarc Vertes <mvertes@free.fr>2021-04-10 14:15:57 +0200
commit3f9cb5afb3b6ee2d4234d5e4d3e5398cf022bc41 (patch)
treee46008be7c34374f62100f8fa9f42465ba0ef49b /bin/vm
parentae04cc260d63765fc20a2d7bb21d121986f71445 (diff)
update vm
Diffstat (limited to 'bin/vm')
-rwxr-xr-xbin/vm7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/vm b/bin/vm
index 818d6f8..19255d2 100755
--- a/bin/vm
+++ b/bin/vm
@@ -47,6 +47,9 @@ add() {
cp "../$c/vmlinux" "../$c/initrd" .
echo "kernel=${k-vmlinux}" >> config
echo "initrd=initrd" >> config
+ echo "cpu=1" >> config
+ echo "ram=512" >> config
+ echo "arg=\"console=hvc0\"" >> config
}
}
@@ -119,7 +122,7 @@ exp() {
'
sleep 1 && screen -X stuff 'y
'
- sleep 20 && screen -X stuff 'cat /etc/fstab
+ sleep 20 && screen -X stuff 'blkid /dev/vda3
'
}
@@ -253,7 +256,7 @@ stop() {
[ "$1" ] || die 'stop: name missing'
cd "$dir/$1" || die 'stop $1 failed'
[ -f vftool.pid ] || die "stop: vm $1 is not active"
- kill $(cat vftool.pid)
+ kill $(cat vftool.pid) || rm -f vftool.pid
}
usage() { [ "$Opth" ] && printf " %-34s %s\n" "$1" "$2"; }