Bug 1189143

Summary: virt-install nvram_template does not work for non-root users
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, dyuan, gscrivan, jiahu, mzhan, pbrobinson, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-13 14:41:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2015-02-04 14:50:05 UTC
Description of problem:

virt-install [...] \
  --boot loader=/usr/share/AAVMF/AAVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/AAVMF/AAVMF_VARS.fd \
  [...]
...
ERROR    Failed to create file '/var/lib/libvirt/qemu/nvram/tmp-b2a0182a_VARS.fd': Permission denied

It should use a different directory for non-root users.

Version-Release number of selected component (if applicable):

virt-install-1.1.0-4.git310f6527.fc22.noarch

How reproducible:

100%

Steps to Reproduce:
1. See command above.

Comment 1 Richard W.M. Jones 2015-02-04 14:52:22 UTC
Workaround is:

vars=$(mktemp)
cp /usr/share/OVMF/OVMF_VARS.fd $vars
virt-install ... ,nvram=$vars

Comment 2 Cole Robinson 2015-02-07 00:11:15 UTC
This is libvirt's fault, virt-install isn't doing anything special here

Comment 3 Cole Robinson 2015-05-13 14:41:46 UTC
FWIW this is fixed upstream with libvirt 1.2.15:

commit 19425d110b0ca2ea3588dbf880ce48d81edea89c
Author: Cole Robinson <crobinso>
Date:   Thu Apr 23 20:01:05 2015 -0400

    qemu: Build nvram directory at driver startup