QEMU/Guests/Ubuntu 16.04

From Computernewb Wiki
Revision as of 09:01, 9 May 2022 by Undefishin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
File:1604Desktop.png
The Ubuntu 16.04 desktop.

Ubuntu 16.04 is an operating system created by Canonical, released on April 21, 2016. Support ended in April 2021.

Running on CollabVM

Due to the "noob-friendly" nature of Ubuntu, Ubuntu is a good choice for a Linux VM. It runs fine as a VM on CollabVM.

Users may frequently run the infamous "sudo rm -rf /" command. There is no easy way to fix this other than to enable vote reset and install safe-rm.

Sudo normally requires a password but you can add a line in visudo to not require one.

If you're using Ubuntu, the Unity login screen breaks if you do not have a password set on a user account. You may want to use gdm instead.

Recommended version: Ubuntu 16.04.6 LTS

Starting up

QEMU

Pre-installation

Make a qcow2 image (or a raw image if you want) by typing

qemu-img create -f qcow2 ubuntu.img 40G

40 gigabytes is enough for a normal VM.

When that's done, run the following command:

qemu-system-x86_64 -hda ubuntu.img -cdrom ubuntu_iso.iso -boot d -enable-kvm -cpu host -m 2G -vga std -net nic,model=virtio -net user -usbdevice tablet -localtime

Running Ubuntu 16.04 without hardware acceleration is a very bad idea. Unity and most heavy DEs like KDE and GNOME are virtually unusable without hardware acceleration. If you're going to be running Ubuntu without it, choose LXDE or XFCE (alternatively, you could install Ubuntu Server, which doesn't come with a DE by default).

We set the RAM to 2 gigabytes (2G) which is good enough for a standard 64-bit installation. For a 32-bit install you can lower it to about 1 GB. If you're using Unity however, don't set it lower than 1 GB because Unity becomes unresponsive with low amounts of RAM.

After installation

qemu-system-x86_64 -hda ubuntu.img -boot c -enable-kvm -cpu host -m 2G -vga std -net nic,model=virtio -net user -usbdevice tablet -localtime