qemu No serial console in VM images?

Am I doing something wrong or VM images don't come with serial console enabled?

Bash:
set -e
wget https://download.freebsd.org/ftp/releases/VM-IMAGES/14.0-RELEASE/amd64/Latest/FreeBSD-14.0-RELEASE-amd64.qcow2.xz
xz -d FreeBSD-14.0-RELEASE-amd64.qcow2.xz
sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 4G \
  -drive file=FreeBSD-14.0-RELEASE-amd64.qcow2,if=virtio \
  -nographic

I see no output. Replacing -nographic with -display curses works well enough so I can enable serial console myself:

Bash:
echo '-S115200 -Dh' > /boot.config
cat <<EOT >> /boot/loader.conf
boot_multicons="YES"
boot_serial="YES"
console=comconsole
EOT

But why wouldn't this be a default in images built specifically for running in VMs which are very often headless???
 
One reason might be that people who use a lot of VMs tend to use tools like vnc, spice, or virt-manager to access the VM, not a serial port. Unfortunately, FreeBSD does not yet support the spice-vdagent which gives copy/paste and file transfer between host and guest. Virt-manager requires a compatible hypervisor. VNC (tightvnc) works though.
 
VM images don't come with serial console enabled?
Do you have very long serial cable to reach the datacenter?

Seriously though. Cloud providers usually provide a console from the web control panel.
See virsh for setting up your image and sneaking back in when you forget your credentials.
 
Back
Top