Skip to content
Snippets Groups Projects
Commit 222b3bb7 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.use virtio nic by default for better network performance

parent a8f6898b
No related branches found
No related tags found
No related merge requests found
...@@ -112,7 +112,7 @@ function start_vm_if_not_running () { ...@@ -112,7 +112,7 @@ function start_vm_if_not_running () {
[[ ! -f "vm/$name/disk.img" ]] && echo2 "In start_vm, disk image vm/$name/disk.img doesn't exist. Did init_vm fail?" && return 1 [[ ! -f "vm/$name/disk.img" ]] && echo2 "In start_vm, disk image vm/$name/disk.img doesn't exist. Did init_vm fail?" && return 1
echo2 "+ Starting VM $name with options_txt '$options_txt' and uuid $uuid..." echo2 "+ Starting VM $name with options_txt '$options_txt' and uuid $uuid..."
[[ -f "vm/$name/initimg.iso" ]] && options+=(-cdrom "vm/$name/initimg.iso") [[ -f "vm/$name/initimg.iso" ]] && options+=(-cdrom "vm/$name/initimg.iso")
nohup qemu-system-x86_64 --uuid "$uuid" -drive file="vm/$name/disk.img",if=virtio -cpu host --enable-kvm -net nic,model=rtl8139 "${options[@]}" >> tmp/qemu.log 2>&1 & disown nohup qemu-system-x86_64 --uuid "$uuid" -drive file="vm/$name/disk.img",if=virtio -cpu host --enable-kvm -net nic,model=virtio-net-pci "${options[@]}" >> tmp/qemu.log 2>&1 & disown
} }
function do_init () { function do_init () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment