Bug 517308 - Fails to install to image file in home directory
Fails to install to image file in home directory
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-08-13 09:13 EDT by Tim Waugh
Modified: 2009-08-15 04:52 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-15 04:52:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2009-08-13 09:13:50 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):

How reproducible:
Comment 1 Daniel Berrange 2009-08-13 09:38:27 EDT
Can you confirm whether  /home/twaugh/VM  is world readable - eg so 'qemu' unprivileged user can open files in that directory ?
Comment 2 Tim Waugh 2009-08-15 04:52:47 EDT
Oh, my home directory wasn't.  That fixes it.  Sorry for the noise, hadn't realised libvirt was no longer root...

Note You need to log in before you can comment on or make changes to this bug.