Step 1.
Add a serial port when your VM is running (click your VM, click Hardware, click Add and pick Serial port, default settings are good).


Step 2.
Log into its console and open the grubfile
Code: Select all
sudo nano /etc/default/grub

Step 3.
Find the line GRUB_CMDLINE_LINUX_DEFAULT and add following in it: quiet splash console=tty0 console=ttyS0,115200n8

Full line looks like this:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty0 console=ttyS0,115200n8"Step 3.
Code: Select all
sudo update-grub
Step 4.
Code: Select all
sudo systemctl enable serial-getty@ttyS0.service
Step 5.
Reboot and pray that it works

Step 6.
You need to shutdown and then start again to activate the serial port you added.



Console look like this:
