Bug 501922 - virt-manager: Use libvirt APIs to allow NFS URL installs as non-root
virt-manager: Use libvirt APIs to allow NFS URL installs as non-root
Product: Virtualization Tools
Classification: Community
Component: virt-manager (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Cole Robinson
: 508665 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2009-05-21 06:35 EDT by Charles Rose
Modified: 2014-02-08 19:34 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-08 19:34:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
virt-manager-debug.out (3.79 KB, text/plain)
2009-05-21 06:35 EDT, Charles Rose
no flags Details

  None (edit)
Description Charles Rose 2009-05-21 06:35:25 EDT
Created attachment 344940 [details]

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):

How reproducible:

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 14:45:14 EDT
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 14:58:12 EDT
Might be able to do something with fuse or autofs.

sshfs is kind of cool or cd to /net/NFSSERVER/PATH
Comment 3 Daniel Berrange 2009-05-22 05:31:09 EDT
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 12:14:56 EDT
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:
Comment 5 Mark McLoughlin 2009-09-22 09:55:59 EDT
*** Bug 508665 has been marked as a duplicate of this bug. ***
Comment 6 John Ruemker 2010-02-10 12:58:52 EST
This problem still exists in virt-manager-0.8.2-1.fc12.noarch, even after entering the root password when it starts.  

Comment 7 John Ruemker 2010-05-05 10:12:02 EDT
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.

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

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

su -

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 17:06:31 EDT
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 09:01:56 EST
persists in F16
Comment 14 Cole Robinson 2012-10-23 19:36:05 EDT
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 15:12:01 EDT
virtinst has been merged into virt-manager.git. Moving all virtinst bugs to the virt-manager component.
Comment 16 Cole Robinson 2014-02-08 19:34:57 EST
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

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