I use Quickemu to run virtual machines. I have made some simple configurations to make it work for me. Most of it is in the .conf file. Noting them here for future use.

MAC address
Recently I had to set up a static MAC address so I could join their network. My virtual machines keep changing it. So I configured it to use a static MAC address. I added the following likes to my conf file
macaddr="52:54:00:AB:51:BA"
network="br0"
You will have to create a bridge network on the host. QEMU requires that the MAC address is in the range: 52:54:00:AB:00:00 – 52:54:00:AB:FF:FF
Shared folder
Often I want a shared folder between the VM and my machine. I achieve it by mounting a public_dir. In my conf I add public_dir, pointing to a folder on my host machine that I want to share. Then, inside the VM, I mount it with this command.
sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 Public-thej ~/Public
Now I can go to ~/Public inside the VM to access the shared folder. Please note quickemu builds the tag automatically as Public- based on the public_dir. Guest uses it.
Consistent screen resolution
For some reason, my VMs would choose a really high resolution, and I couldn’t read the text or use the computer. The only way was to go to Displays inside the VM and reset the resolution. I tried adding width and height to the config. It worked during boot; after that, it reverts. So instead of keeping the setting in spicy. I added a small script to change the resolution after booting. It uses gdctl or xrandr based on who controls your screen Wayland or X11. I have added it to autostart, so it runs on login. The script itself is generated by a model, its not special but a bit verbose
# Set VM screen resolution: setres [WIDTHxHEIGHT] (default 1920x1080)
setres() {
local res="${1:-1920x1080}"
local w="${res%x*}" h="${res#*x}"
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
if ! command -v gdctl >/dev/null; then
echo "gdctl not found (needs GNOME 48+ / Ubuntu 25.04+). Log in with 'Ubuntu on Xorg' instead." >&2
return 1
fi
local out mode
out=$(gdctl show | grep -oP 'Monitor \K\S+' | head -n1)
mode=$(gdctl show --modes | grep -oP "${w}x${h}@[0-9.]+" | head -n1)
if [ -z "$mode" ]; then
echo "Mode ${res} not available on ${out}" >&2
return 1
fi
gdctl set --logical-monitor --primary --monitor "$out" --mode "$mode"
else
local out
out=$(xrandr | awk '/ connected/{print $1; exit}')
if ! xrandr | grep -q "^ *${w}x${h} "; then
local modeline name
modeline=$(cvt "$w" "$h" 60 | sed -n 's/^Modeline //p')
name=$(echo "$modeline" | awk '{print $1}' | tr -d '"')
xrandr --newmode $modeline 2>/dev/null
xrandr --addmode "$out" "$name"
xrandr --output "$out" --mode "$name"
else
xrandr --output "$out" --mode "${w}x${h}"
fi
fi
}
Conf
This is how my conf file looks in general now.
#!/usr/bin/quickemu --vm
guest_os="linux"
disk_img="ubuntu-22.04/disk.qcow2"
iso="ubuntu-22.04.5-desktop-amd64.iso"
network="br0"
macaddr="52:54:00:AB:51:BA"
public_dir=/home/thej/Public/vm-shared-ubuntu-22.04
# Resolution setting that didnt work
width="1920"
height="1080"
















