Some docs that might be handy:
- XFCE: https://www.linuxmint.com/edition.php?id=320
- Installation Guide: https://linuxmint-installation-guide.readthedocs.io/en/latest/
$ aria2c https://ftp.kaist.ac.kr/linuxmint-iso/stable/22.1/linuxmint-22.1-xfce-64bit.iso
$ sha256sum linuxmint-22.1-xfce-64bit.iso
6451496af35e6855ffe1454f061993ea9cb884d2b4bc8bf17e7d5925ae2ae86d linuxmint-22.1-xfce-64bit.iso
$ qemu-img create -f qcow2 linuxmint-22.1-xfce-64bit.qcow2 20G
To start VM, execute following script or paste appropriate content into terminal.
#! /bin/sh
# adapted from:
#
# https://www.baeldung.com/linux/qemu-from-terminal
qemu-system-x86_64 \
-enable-kvm \
-m 4G \
-smp 2 \
-hda linuxmint-22.1-xfce-64bit.qcow2 \
-boot d \
-cdrom linuxmint-22.1-xfce-64bit.iso \
-netdev user,id=net0,net=192.168.0.0/24,dhcpstart=192.168.0.9 \
-device virtio-net-pci,netdev=net0 \
-vga qxl \
-device AC97
-
Choose the default start option at the "boot menu" and wait for graphical environment to finish starting
-
Double click on "install linux mint", follow the prompts, and wait
-
Shutdown VM
Create and use following shell script for subsequent boots (includes directory sharing)
#! /bin/sh
# adapted from:
#
# https://www.baeldung.com/linux/qemu-from-terminal
qemu-system-x86_64 \
-enable-kvm \
-m 4G \
-smp 2 \
-hda linuxmint-22.1-xfce-64bit.qcow2 \
-netdev user,id=net0,net=192.168.0.0/24,dhcpstart=192.168.0.9 \
-device virtio-net-pci,netdev=net0 \
-vga qxl \
-device AC97 \
-virtfs local,path=shared,mount_tag=host0,security_model=mapped,id=host0
-
Boot vm using new shell script
-
Log in
-
Create following shell script for enabling sharing from within the VM:
#! /bin/sh mkdir -p shared sudo mount -t 9p -o trans=virtio,version=9p2000.L host0 shared
-
Explore the default dialog that has suggestions about updates and configuration
-
Check for and Disable Undesirable Running Services
$ sudo netstat -tunlp
Likely cups, avahi, systemd-resolved (on tcp and udp port 53) are running.
To stop and remove avahi:
$ sudo apt remove avahi-daemon
To stop and remove cups things:
$ sudo apt purge cups cups-common cups-daemon
To deal with systemd-resolved:
sudo mkdir -p /etc/systemd/resolved.conf.d/
Make a file at /etc/systemd/resolved.conf.d/disable-stub.conf with content:
[Resolve] DNSStubListener=no
Repoint /etc/resolv.conf to the non-stub file and restart systemd-resolved:
$ sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf $ sudo systemctl restart systemd-resolved
-
Shutdown