- First get the image:
wget https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-live-server-amd64.iso
- Create the virtual hard drive on to which the guest OS will be installed:
qemu-img create -f qcow2 ubuntu.qcow2 30g
- Install the OS referencing the image we downladed and the virtual hard drive we created:
qemu-system-x86_64 \
-cdrom "ubuntu-22.04.3-live-server-amd64.iso" \
-hda "ubuntu.qcow2" \
-m "4G"
An installation window should pop up!