Debian VM doesn’t boot on QEMU with "console=hvc0" kernel parameter
2
votes
1
answer
1483
views
I’m running virtual linux machine (debian12) on QEMU with
-device virtconsole
argument. That argument adds **/dev/hvcX** device nodes to VM. QEMU can connect that device to unix socket on host. If i pass “console=hvc0” parameter to VM’s kernel i get console on host socket and can launch tty on it. However it works only if i configure alongside another one console kernel parameter, e.g. =ttyAMA0 console=hvc0
. The problem is that VM doesn’t boot with single =hvc0
kernel parameter. Am i missing something?
The whole QEMU command:
qemu-system-aarch64 \
-M virt,accel=hvf,highmem=off \
-cpu host \
-smp 2 \
-m 2048 \
-display none \
-daemonize \
-monitor unix:/tmp/qemu-monitor-socket,server=on,wait=off \
-device virtio-serial-pci \
-chardev socket,path=/tmp/qemu-guest-tty,server=on,wait=off,id=guest-tty \
-device virtconsole,chardev=guest-tty \
-device virtio-net-pci,netdev=mynet0,mac=52:54:00:08:06:8b \
-netdev user,id=mynet0,hostfwd=tcp::22221-:22 \
-device virtio-blk-pci,drive=hda \
-drive file=~/qemu/debian/1-debian-12-genericcloud-arm64.qcow2,format=qcow2,discard=unmap,id=hda,if=none \
-cdrom ~/qemu/cloud-init/cloud-init.iso \
-kernel ~/qemu/debian/vmlinuz-6.1.0-9-cloud-arm64 \
-initrd ~/qemu/debian/initrd.img-6.1.0-9-cloud-arm64 \
-append 'root=/dev/vda1 ds=nocloud;h=debian1 console=hvc0'
UPD: Problem existing only in Debian. I've tested Ubuntu, Fedora and openSUSE - they boot normally with
configured as the only console. All distributions i've tested were latest "cloud" ARM64 images. I've tried debian-12-genericcloud and debian-11-genericcloud images with same result.
Asked by xycainoff
(23 rep)
Jul 18, 2023, 10:22 PM
Last activity: Aug 21, 2023, 02:27 PM
Last activity: Aug 21, 2023, 02:27 PM