From cd6224ff639b9260a110e4ea8bb7a6bab7b857ba Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 21 Jan 2014 13:21:06 +0100 Subject: qinit: use libvirt network bridge; use virtio-scsi; useful default boot order virtio-scsi is supposed to be faster Signed-off-by: Florian Pritz --- qinit | 7 +++---- 1 file 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[@]}} "$@" -- cgit v1.2.3-24-g4f1b