summaryrefslogtreecommitdiffstats
path: root/qinit
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-01-21 13:21:06 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-01-21 13:21:06 +0100
commitcd6224ff639b9260a110e4ea8bb7a6bab7b857ba (patch)
tree70771f133e32b6051bfd8059e80734781fe0ef3f /qinit
parent3271a8db0be8e284f9f7a348d922e2baac0b14ee (diff)
downloadbin-cd6224ff639b9260a110e4ea8bb7a6bab7b857ba.tar.gz
bin-cd6224ff639b9260a110e4ea8bb7a6bab7b857ba.tar.xz
qinit: use libvirt network bridge; use virtio-scsi; useful default boot order
virtio-scsi is supposed to be faster Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'qinit')
-rwxr-xr-xqinit7
1 files changed, 3 insertions, 4 deletions
diff --git a/qinit b/qinit
index bdece6e..599b827 100755
--- a/qinit
+++ b/qinit
@@ -32,8 +32,7 @@ declare imgroot=$config_root
### Defaults #############################
declare mem="-m 1024"
declare cpus="-cpu host -smp 4"
-#declare net="-net vde -net nic,model=virtio"
-declare net="-netdev bridge,br=br-qemu,id=mynet0 -device virtio-net,netdev=mynet0"
+declare net="-netdev bridge,br=virbr0,id=mynet0 -device virtio-net,netdev=mynet0"
cdrom+=("-boot" "d")
#declare cdrom="-cdrom $isoroot/archlinux-2012.11.01-dual.iso -boot d"
@@ -68,7 +67,7 @@ vm_$vm
# default drives
if (( ${#drives[*]} == 0 )); then
for drive in "$imgroot/$vm".*.raw; do
- drives+=("-drive" "file=$drive,if=virtio,format=raw")
+ drives+=("-drive" "file=$drive,if=virtio,format=virtio-scsi")
done
for drive in "$imgroot/$vm".*.qcow2; do
@@ -76,5 +75,5 @@ if (( ${#drives[*]} == 0 )); then
done
fi
-exec qemu-system-x86_64 --machine type=pc,accel=kvm "${opts[@]}" $cpus $mem "${drives[@]}" $net ${usecdrom:+${cdrom[@]}} "$@"
+exec qemu-system-x86_64 --machine type=pc,accel=kvm -boot order=dcn "${opts[@]}" $cpus $mem "${drives[@]}" $net ${usecdrom:+${cdrom[@]}} "$@"