Virtual machines are useful for running other operating systems within your computer and for testing and sandboxing system-level software. This post is about running VMs locally on Linux: how to get a usable disk image and how to connect to it over SSH. It's not as trivial as it sounds.
The VM ecosystem has evolved over the last decades.
QEMU/KVM
is still the easiest way to get started on Linux, but many of the ecosystem's
projects are designed for running cloud services rather than for desktop or
casual server use. This post aims to provide simple instructions for running
VMs without installing large software stacks. It covers running VMs with and
without cloud-init
and
libvirt.