Skip to content

Commit

Permalink
Set kvm_serial_device to virtio-serial in the fixup
Browse files Browse the repository at this point in the history
We do this only if the $BUILD_ROOT/.build.console.$VM_TYPE file
contains a "virtio" line.
  • Loading branch information
mlschroe committed May 14, 2020
1 parent 5986435 commit 7b43db7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-vm-kvm
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ vm_fixup_kvm() {
VM_SWAPDEV=/dev/disk/by-id/virtio-1
fi
fi
if test "$VM_TYPE" = kvm -a -z "$kvm_serial_device" ; then
if test -e "$BUILD_ROOT/.build.console.$VM_TYPE" && grep -q '^virtio$' "$BUILD_ROOT/.build.console.$VM_TYPE" ; then
echo "Detected virtio-serial support"
kvm_serial_device=virtio-serial,max_ports=2
kvm_console=hvc0
fi
fi
}

vm_attach_root_kvm() {
Expand Down

0 comments on commit 7b43db7

Please sign in to comment.