Bug 517308 - Fails to install to image file in home directory
Summary: Fails to install to image file in home directory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-13 13:13 UTC by Tim Waugh
Modified: 2009-08-15 08:52 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-15 08:52:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim Waugh 2009-08-13 13:13:50 UTC
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):
libvirt-0.7.0-3.fc12.x86_64
virt-manager-0.8.0-1.fc12.noarch

How reproducible:
100%

Comment 1 Daniel Berrangé 2009-08-13 13:38:27 UTC
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 08:52:47 UTC
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.