Bug 547542

Summary: RFE: Expose required default guest file ownership in capabilities
Product: [Community] Virtualization Tools Reporter: Daniel BerrangĂ© <berrange>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, clalance, cpelland, crobinso, dallan, hbrock, itamar, jforbes, llim, mbooth, mjenner, veillard, virt-maint, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 546660 Environment:
Last Closed: 2012-02-07 22:34:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Berrangé 2009-12-14 21:43:54 UTC
+++ This bug was initially created as a clone of Bug #546660 +++

Description of problem:
F12 changed the default user libvirt runs qemu as from root to qemu. However, virStorageVolCreateXML still defaults to creating volumes as owned by root. In addition, there is no API to determine what the ownership should be set to. This means that any tool which uses libvirt to create a volume:

* must be configured based on the target distro.
* will break if the default is overridden.

I don't think changing the virStorageVolCreateXML default is right, because the pool might also be used by another hypervisor with different requirements. Instead, I think a new API on the connection might be necessary. For example:

virConnectGetPermissions(conn) might return:

          <permissions>
            <owner>0744</owner>
            <group>0744</group>
            <mode>0744</mode>
            <volumelabel>virt_image_t</volumelabel>
          </permissions>

Version-Release number of selected component (if applicable):
libvirt-0.7.4-1.fc12.x86_64

--- Additional comment from mbooth on 2009-12-11 10:45:58 EDT ---

The above is cut/paste from the docs. However, owner and group are clearly bogus ;) Should of course be uid and gid.

Comment 2 RHEL Program Management 2009-12-14 22:06:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Dave Allan 2010-02-19 17:03:12 UTC
I talked to mbooth about getting the info required, and it's all currently available to libvirt, so this feature is simply a matter of creating the API to provide it.

Comment 5 Daniel Berrangé 2010-04-16 14:58:41 UTC
This RFE is not required for 6.0, so retargetting for 6.1

Comment 6 Dave Allan 2010-05-17 19:18:00 UTC
I agree with Daniel; moving to 6.1

Comment 11 Cole Robinson 2012-02-07 22:34:43 UTC

*** This bug has been marked as a duplicate of bug 546660 ***