summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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[@]}} "$@"