Bug 1783255 - <nvram> auto-creation does not honour permissions defined in libvirtd.conf
Summary: <nvram> auto-creation does not honour permissions defined in libvirtd.conf
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-13 12:58 UTC by Mark Zealey
Modified: 2019-12-27 22:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Mark Zealey 2019-12-13 12:58:43 UTC
Description of problem: <nvram> auto-creation does not honour permissions defined in libvirtd.conf


Version-Release number of selected component (if applicable): libvirt-4.5.0-23.el7_7.1.x86_64


How reproducible: Always


Steps to Reproduce:
1. Set libvirtd.conf to have user = XXX and group = XXX where XXX is non-root and qemu.conf to have dynamic_ownership = 0
2. virsh create a domain with <nvram> component which instantiates from a template


Actual results:

It has created the file but given it root permissions. 

error: Failed to create domain from XML
error: internal error: qemu unexpectedly closed the monitor: 2019-12-13T14:52:42.059479Z qemu-kvm: -drive file=.../OVMF_VARS.fd,if=pflash,format=raw,unit=1: Could not open '.../OVMF_VARS.fd': Permission denied


Expected results:

The template file should be correctly instantiated owned by the user/group specified in libvirtd.conf rather than root.root. This is the case of eg block operations while running so no idea why it's not being applied to nvram created from a template.

Additional info:

Setting dynamic_ownership = 1 fixes this but messes up other permissions in other parts of the system.


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