Red Hat Bugzilla – Bug 501922
virt-manager: Use libvirt APIs to allow NFS URL installs as non-root
Last modified: 2014-02-08 19:34:57 EST
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):
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.
virt-manager creates and starts the guest
virt-manager throws a pop-up message
running virt-manger as root does not show this issue.
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
Might be able to do something with fuse or autofs.
sshfs is kind of cool or cd to /net/NFSSERVER/PATH
The libvirt storage management APIs have support for setting up NFS storage pools that could be used for this too.
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:
*** Bug 508665 has been marked as a duplicate of this bug. ***
This problem still exists in virt-manager-0.8.2-1.fc12.noarch, even after entering the root password when it starts.
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.
Still broken in Fedora 13.
Just to re-iterate, there is a workaround here:
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.
Since this isn't upstream yet, it's unlikely to be fixed in f13. Reassigning to rawhide.
persists in F16
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.
virtinst has been merged into virt-manager.git. Moving all virtinst bugs to the virt-manager component.
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