KVM can’t access iso o raw images outside /var/lib/libvirt/images

kvmlmdevirt-manager

I'm using Linux Mint Debian Edition (Up. 8)
when tryng to start a virtual machine from libvirt (either from commandline or using virt-manager to local qemu-kvm)
I get this error when I use an image that is not loaded in the default datastore:

if I copy the same image (in this example an .iso file) to the /var/lib/libvirt/images folder it works.

I've tried to chown and chmod it to every possible owner and mode but it just won't work.

SELinux is not in place in this distro so I don't know where's the point, in logs I can see just permission denied and I'm quite stuck.

Impossibile completare l'installazione: 'internal error: process exited while connecting to monitor: qemu-system-x86_64: -drive file=/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso: Could not open '/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso': Permission denied
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1949, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1249, in start_install
    noboot)
  File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1317, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2897, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -drive file=/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso: Could not open '/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso': Permission denied

any clues?

Best Answer

The user libvirt-qemu must be capable of accessing the directory /home/penzo/Scaricati/, not just the file within.

Related Question