Red Hat Bugzilla – Bug 517308
Fails to install to image file in home directory
Last modified: 2009-08-15 04:52:47 EDT
Description of problem:
I have a directory 'VM' in my home directory, and used this command to set the SELinux file contexts appropriately:
semanage fcontext -a -t virt_image_t '/home/twaugh/VM(/.*)?'
There is a file there, F11.img:
-rw-r--r--. root root system_u:object_r:virt_image_t:s0 F11.img
While attempting to install a guest in /home/twaugh/VM/F11.img I get a traceback:
Unable to complete install '<class 'libvirt.libvirtError'> internal error unable to start guest: qemu: could not open disk image /home/twaugh/VM/F11.img
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 1489, in do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 628, in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 726, in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1077, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error unable to start guest: qemu: could not open disk image /home/twaugh/VM/F11.img
Same configuration worked in Fedora 11.
Version-Release number of selected component (if applicable):
Can you confirm whether /home/twaugh/VM is world readable - eg so 'qemu' unprivileged user can open files in that directory ?
Oh, my home directory wasn't. That fixes it. Sorry for the noise, hadn't realised libvirt was no longer root...