blanchet
Guru
- Joined
- Apr 17, 2018
- Messages
- 516
Abstract
To have a lighter Linux virtual machine, you can install it without VNC, with only the serial console.
This guide explains how to do it for Ubuntu Server 20.04 on TrueNAS-12.0u2.1
Install Ubuntu 20.04 with the serial console in bhyve
Open the VM creation wizard
Before starting the installation you have to change some settings
In the virtual machines devices, change the devices orders like this
In the DISK properties, force disk sector size to 4096
Return to the VM list
Keep the xterm window open while powering on the VM
Ubuntu detects that you are installing in text mode and propose to use Rich mode to have colors, if it does not work, use the basic mode instead.
At the installation end
The installation is finished, enjoy your new Ubuntu Server 20.04 with a serial console.
To have a lighter Linux virtual machine, you can install it without VNC, with only the serial console.
This guide explains how to do it for Ubuntu Server 20.04 on TrueNAS-12.0u2.1
Install Ubuntu 20.04 with the serial console in bhyve
Open the VM creation wizard
Code:
1/ Operating System Guest Operating System: Linux Name: ubuntu_server Description: ubuntu server in serial mode System clock: Local Boot Method: UEFI [x] Start on Boot [_] Enable VNC 2/ CPU and Memory Virtual CPUs: 1 Memory: 2 GiB 3/ Disks (o) Create new disk Select Disk Type: Virtio zvol location: tank1 Size: 10 GiB 4/ Network Interface Adapter type: VirtIo Mac Address: <autogenerated> Attach NIC: <select you NIC> 5/ Installation Media /mnt/tank1/iso/ubuntu-20.04.2-live-server-amd64.iso 6/ Confirm Options SUBMIT
Before starting the installation you have to change some settings
In the virtual machines devices, change the devices orders like this
- NIC: 1000
- DISK: 1002
- CDROM: 2000
In the DISK properties, force disk sector size to 4096
Return to the VM list
- Open COLUMNS menu to display the Com Port of your new virtual machine and note it.
- For example
/dev/nmdm20B
- run xterm , because it interprets neither keys (F1, F2, etc) nor shortcuts unlike gnome-terminal
- connect with SSH to TrueNAS
- from a Windows computer, you can use PuTTY instead of xterm + ssh
- in the TrueNAS shell, connect to the virtual serial port of the virtual machine
- The TrueNAS webUI supports also the serial console, but it is not as reliable as xterm or PuTTY
Code:
truenas# cu -l /dev/nmdm20B
Keep the xterm window open while powering on the VM
- Select the entry Install Ubuntu Server
- Press e to edit the command line
- Modify the linux line to disable vga and to enable serial console. Be careful the key END and DELETE do not work as expected. BACKSPACE behaves like DELETE. In case of issue, press ESC to return to the main menu
Code:
linux /casper/vmlinuz vga=off console=ttyS0,115200n8
- Hit CTRL+X to boot
Ubuntu detects that you are installing in text mode and propose to use Rich mode to have colors, if it does not work, use the basic mode instead.
At the installation end
- Power off the VM
- Remove the CDROM device from the VM
- Power on the VM
The installation is finished, enjoy your new Ubuntu Server 20.04 with a serial console.