Permission failure on unattended install
On NixOS, installing a VM in gnome-boxes using the built-in provisioning fails, the following toast is displayed:
An error occurred during installation preparation. Express Install disabled.
Looking at the troubleshooting log, there is a permission error:
qemu-system-x86_64: -device usb-storage,bus=usb.0,port=1,drive=libvirt-1-format,id=usb-disk0,removable=off: Could not open '/home/bf/.cache/gnome-boxes/silverblue35-unattended.img': Permission denied
It can be manually worked around like this:
$ chmod +w ~/.cache/gnome-boxes/silverblue35-unattended.img
This is likely because Boxes copies share/gnome-boxes/unattended/disk.img
to cache with mode preserved. On NixOS, packages are immutable so the file will have 0444 mode:
-r--r--r-- 1 root root 1.5M Jan 1 1970 /nix/store/w5axw4cirzhv0ayjhfw8vnbmqa8mm2wy-gnome-boxes-43.1/share/gnome-boxes/unattended/disk.img
Steps To Reproduce
- Open gnome-boxes and click
+
in the corner to start creating a new VM. - Select Fedora Silverblue from the "Featured Downloads" list.
- Accept the default choices (and maybe add user/password), continue.
- Notice the Express Installation failure toast.
I am using Boxes 43.1
Downstream issue: https://github.com/NixOS/nixpkgs/issues/201555
Edited by Jan Tojnar