6

I am trying to install win8.1 as a guest on my Ubuntu 14.04 using KVM and virt manager. When I choose the path of the ISO file in virt manager, it throws this error:

The emulator may not have search permissions for the path '/media/owerfoll/B/windows8.1 Enterprise.iso'

How I can fix this?!

8

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

  1. Run virt-manager with sudo:

    sudo virt-manager
    
  2. 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 chmod libvirt-qemu:libvirt-qemu <image-file> if you want to do it manually.

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

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

  • It just changes the file to root:root, definitely not what one would want. But the workaround works though. – Hi-Angel Oct 17 '16 at 13:41
  • sudo virt-manager doesn't seem to launch: (virt-manager:6118): Gtk-WARNING **: cannot open display: :0 – Thufir Nov 14 '17 at 8:43
2

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.

1

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 libvert-qemu user execute rights to install my vm, I ran:

setfacl -m u:libvert-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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.