Bug 501922

Summary: virt-manager: Use libvirt APIs to allow NFS URL installs as non-root
Product: [Community] Virtualization Tools Reporter: Charles Rose <charles_rose>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: acathrow, berrange, clalance, crobinso, dwalsh, ejacobs, hbrock, itamar, jruemker, nphilipp, roland, rstclair, veillard, virt-maint, wwlinuxengineering, zing
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-09 00:34:57 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:
Attachments:
Description Flags
virt-manager-debug.out none

Description Charles Rose 2009-05-21 10:35:25 UTC
Created attachment 344940 [details]
virt-manager-debug.out

Description of problem:
virt-manager running as a normal user requests for the root password during startup after which creating guests from a http or ftp install source works fine. But while creating guests with NFS install source, we see this error:

Error setting install media location.
Privilege is required for NFS installations

Version-Release number of selected component (if applicable):
virt-manager-0.7.0-4.fc11.x86_64
libvirt-0.6.2-8.fc11.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Login as a normal user
2. Start virt-manager from the menu
3. Provide the root password when prompted for
4. Create a new guest with an NFS install source. Clicking forward would result in a pop-up error message.

Actual results:
virt-manager creates and starts the guest

Expected results:
virt-manager throws a pop-up message 

Additional info:
running virt-manger as root does not show this issue.

Comment 1 Mark McLoughlin 2009-05-21 18:45:14 UTC
Right, in F11 virt-manager is no longer running as root and I guess it needs root to mount an NFS share

Moving to virtinst and adding to F11VirtTarget

Comment 2 Daniel Walsh 2009-05-21 18:58:12 UTC
Might be able to do something with fuse or autofs.

sshfs is kind of cool or cd to /net/NFSSERVER/PATH

Comment 3 Daniel Berrangé 2009-05-22 09:31:09 UTC
The libvirt storage management APIs have support for setting up NFS storage pools that could be used for this too.

Comment 4 Bug Zapper 2009-06-09 16:14:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Mark McLoughlin 2009-09-22 13:55:59 UTC
*** Bug 508665 has been marked as a duplicate of this bug. ***

Comment 6 John Ruemker 2010-02-10 17:58:52 UTC
This problem still exists in virt-manager-0.8.2-1.fc12.noarch, even after entering the root password when it starts.  

-John

Comment 7 John Ruemker 2010-05-05 14:12:02 UTC
Any updates here?  Its quite a pain that every time I try to install via an NFS source I get the error, have to quit virt-manager, log in as root, start virt-manager, and repeat the installation.  Let me know if there's anything I can do to test or help.

-John

Comment 8 Roland McGrath 2010-06-18 10:06:26 UTC
Still broken in Fedora 13.

virt-manager-0.8.4-1.fc13.noarch
python-virtinst-0.500.3-1.fc13.noarch

Comment 9 Cole Robinson 2010-07-22 17:30:12 UTC
Just to re-iterate, there is a workaround here:

su -
virt-manager

the '-' is important otherwise gconf might complain.

I'm not really sure how we can fix this if running virt-manager unprivileged. We could try to leverage libvirt storage pools to mount the NFS share, but not sure how we could detect the OS without recursively creating a bunch of directory pools, or mounting the share in a sufficiently permissible location so our regular user can poke into it, which sounds a little sketchy.

Another workaround option: manually mount the share, then point to the local directory as the install URL. That shouldn't require running virt-manager as root.

Comment 10 Cole Robinson 2011-03-29 21:06:31 UTC
Since this isn't upstream yet, it's unlikely to be fixed in f13. Reassigning to rawhide.

Comment 11 Erik M Jacobs 2011-11-11 14:01:56 UTC
persists in F16

Comment 14 Cole Robinson 2012-10-23 23:36:05 UTC
This has lingered for a while and probably won't be fixed any time soon, so moving to the upstream tracker. The preferred workaround here is to either run virt-manager as root, or mount the nfs share ahead of time and point virt-manager at the mount point.

Comment 15 Cole Robinson 2013-04-21 19:12:01 UTC
virtinst has been merged into virt-manager.git. Moving all virtinst bugs to the virt-manager component.

Comment 16 Cole Robinson 2014-02-09 00:34:57 UTC
As mentioned in comment #9, this is likely to do this for the unprivileged user possible using libvirt storage APIs, but it would be awkward and a pain to implement. I don't plan on implementing this RFE, and it has already lingered for almost 5 years.

If someone shows up with a patch on the mailing list I'll be happy to review it, but keeping this bug open is not going to solve anything. Closing as WONTFIX