git.annexia.org
/
supernested.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aea0239
)
Add --smp option.
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 3 Jul 2014 15:38:48 +0000
(16:38 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 3 Jul 2014 16:00:00 +0000
(17:00 +0100)
run-supernested.sh.in
patch
|
blob
|
history
diff --git
a/run-supernested.sh.in
b/run-supernested.sh.in
index
51d84da
..
eac3d9b
100644
(file)
--- a/
run-supernested.sh.in
+++ b/
run-supernested.sh.in
@@
-25,10
+25,11
@@
format=qcow2
kernel=kernel
initrd=initrd
append="panic=1 console=ttyS0 udevtimeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
kernel=kernel
initrd=initrd
append="panic=1 console=ttyS0 udevtimeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
+smp=
TEMP=`getopt \
-o '' \
TEMP=`getopt \
-o '' \
- --longoptions 'help,nested' \
+ --longoptions 'help,nested
,smp:
' \
-n run-supernested.sh -- "$@"`
if [ $? != 0 ]; then
echo "$0: problem parsing the command line arguments"
-n run-supernested.sh -- "$@"`
if [ $? != 0 ]; then
echo "$0: problem parsing the command line arguments"
@@
-36,6
+37,14
@@
if [ $? != 0 ]; then
fi
eval set -- "$TEMP"
fi
eval set -- "$TEMP"
+usage ()
+{
+ echo "$0: Run the supernested appliance."
+ echo " $0 [--smp=N]"
+ echo "Options:"
+ echo " --smp=N Use N virtual CPUs (at all levels)."
+}
+
while true ; do
case "$1" in
--nested)
while true ; do
case "$1" in
--nested)
@@
-45,11
+54,21
@@
while true ; do
format=raw
kernel=/kernel
initrd=/initrd
format=raw
kernel=/kernel
initrd=/initrd
+ smp="$(
+ grep -Eo 'supernested.smp=[[:digit:]]+' /proc/cmdline |
+ grep -Eo '[[:digit:]]+'
+ )"
+ if [ -n "$smp" ]; then smp="-smp $smp"; fi
shift
;;
shift
;;
+ --smp)
+ smp="-smp $2"
+ append="$append supernested.smp=$2"
+ shift 2
+ ;;
--help)
--help)
- echo "$0: read the README file for information about this script"
- exit
1
+ usage
+ exit
0
;;
--)
shift
;;
--)
shift
@@
-89,6
+108,7
@@
append="$append supernested.level=$((level+1))"
echo "Running"
echo " qemu = $qemu"
echo "Running"
echo " qemu = $qemu"
+echo " smp = $smp"
echo " memory = $memory"
echo " kernel = $kernel"
echo " initrd = $initrd"
echo " memory = $memory"
echo " kernel = $kernel"
echo " initrd = $initrd"
@@
-102,6
+122,7
@@
exec \
"$qemu" \
-cpu host \
-machine accel=kvm \
"$qemu" \
-cpu host \
-machine accel=kvm \
+ $smp \
-display none \
-m $memory \
-no-reboot \
-display none \
-m $memory \
-no-reboot \