In the Proxmox VM management page:

  • Add ‘hardware’: ‘Serial Port’.

In the Ubuntu VM:

$ sudo systemctl enable serial-getty@ttyS0.service
$ sudo systemctl start serial-getty@ttyS0.service

ref: