################################################################
kvm_bin=/usr/bin/qemu-kvm
+test ! -x $kvm_bin -a -x /usr/bin/kvm && kvm_bin=/usr/bin/kvm
kvm_console=ttyS0
# assume virtio support by default
vm_startup_kvm() {
qemu_bin="$kvm_bin"
- qemu_args=(-drive file="$VM_IMAGE",format=raw,if=none,id=disk,serial=0,cache=unsafe -device "$kvm_device",drive=disk)
+ qemu_args=(-drive file="$VM_IMAGE",format=raw,if=none,id=disk,cache=unsafe -device "$kvm_device",drive=disk,serial=0)
if [ -n "$VM_USER" ] ; then
getent passwd "$VM_USER" > /dev/null || complain 22 "cannot find KVM user '$VM_USER'"
else
fi
[ -n "$VM_USER" ] && kvm_options="$kvm_options -runas $VM_USER"
if test -n "$VM_SWAP" ; then
- qemu_args=("${qemu_args[@]}" -drive file="$VM_SWAP",format=raw,if=none,id=swap,serial=1,cache=unsafe -device "$kvm_device",drive=swap)
+ qemu_args=("${qemu_args[@]}" -drive file="$VM_SWAP",format=raw,if=none,id=swap,cache=unsafe -device "$kvm_device",drive=swap,serial=1)
fi
# the serial console device needs to be compiled into the target kernel
# which is why we can not use virtio-serial on other platforms