Permission error in virtual machine manager

I had the same issue as well. I fixed it by doing the following:

  1. Run virt-manager with sudo:
        sudo virt-manager
  1. Attempt to create your VM. When the error dialog appears, click Yes to correct the error.

    What this does is change the user and group of your image file (to libvirt-qemu:libvirt-qemu if that's your virt-manager user). You could also sudo chown libvirt-qemu:libvirt-qemu <image-file> if you want to do it manually.

  2. When you get to the next step, cancel the creation process and close virt-manager.

  3. Now relaunch virt-manager without sudo and attempt to create your VM again.


Just encountered this setting up a VM. Pressing the Yes button to automatically fix the problem sets extended ACLs on the file. You can see this by running an ls -l on your directory, and checking the permissions for other.

Instead of opening up permissions for all users in other, you can explicitly set them using setfacl

From the man page:

EXAMPLES
   Granting an additional user read access
          setfacl -m u:lisa:r file

Since I wanted to grant the libvirt-qemu user execute rights to install my vm, I ran:

    setfacl -m u:libvirt-qemu:x 

This sets permissions for specific users, without changing the execute bit for an entire group of the directory. I'm a fan of the tighter control. The permissions on the file should read something like -rw-rw-r-+, with the + meaning there are extended permissions set.

You could just press the Yes button and not worry about what it's doing, but I chose to check it out. I was then able to continue setup in virt-manager without running with sudo and without further error.


Just wanted to toss in my problem/solution in case it helps anyone. I was letting the OS (GalliumOS in my case) decide how and where to mount my external USB SSD where my virtual machine is stored.

It was mounting to /media/<me>/MySSD by default.

I installed gnome-disk-utility, and went in and reconfigured the mount options for that USB drive. I unchecked "use system defaults" and let gnome disks fill in the rest of the settings by itself, which change my mount point to /dev/

Then virt-manager no longer had any issues accessing my gcow file

You can do it manually in /etc/fstab, this was just faster for me.