Sample Header Ad - 728x90

How to map a serial port to the guest virtual machine with UTM?

0 votes
0 answers
175 views
I'm running a Debian VM on MacOS with an Apple Silicon chip using UTM 4.6.4, and I can't figure out how to map the serial port to my VM so that it can use the serial port. I checked the box "Share USB devices from host". It didn’t work. I added -device usb-host,vendorid=0x1234,productid=0x5678 in the QEMU arguments. It didn’t work. I also tried to add -serial /dev/tty.usbserial-0001 to the QEMU command but it makes QEMU crash with this error during the launch : QEMU error: QEMU exited from an error : qemu-aarch64-softmmu: -serial /dev/tty.usbserial-0001: could not connect serial device to character backend '/dev/tty.usbserial-0001' If I try with a mere QEMU command the VM freezes at the very start of the launch with a endless spinning cursor : qemu-system-aarch64 -M virt -accel hvf -cpu host -m 8G -drive file=ubuntu.raw,format=raw -bios /opt/homebrew/share/qemu/edk2-aarch64-code.fd -device virtio-gpu-pci -device qemu-xhci -device usb-kbd -device usb-mouse -device virtio-sound-pci -serial /dev/tty.usbserial-0001 -cdrom /Users/user/Downloads/noble-desktop-arm64.iso Does anyone know how to do this? I can't use VirtualBox because it doesn't run on the new Macs. Additionally, if someone has a solution using QEMU directly, that would be helpful too, since UTM is essentially a wrapper for QEMU. Thx!
Asked by DigitalRomance (171 rep)
Mar 2, 2025, 10:41 PM