[libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

TomK tk at mdevsys.com
Thu Apr 7 23:32:50 UTC 2016


Hey All,

I've an issue where libvirtd tries to access an NFS mount but errors out 
with: can't canonicalize path '/var/lib/one//datastores/0 .  The 
unprevilidged user is able to read/write fine to the share. root_squash 
is used and for security reasons no_root_squash cannot be used.

On the controller and node SELinux is disabled.

[oneadmin at mdskvm-p01 ~]$ virsh -d 1 --connect qemu:///system create 
/var/lib/one//datastores/0/38/deployment.0
create: file(optdata): /var/lib/one//datastores/0/38/deployment.0
error: Failed to create domain from 
/var/lib/one//datastores/0/38/deployment.0
error: can't canonicalize path '/var/lib/one//datastores/0/38/disk.1': 
Permission denied

I added some debug flags to get more info and added -x to the deploy 
script. Closest I get to more details is this:

2016-04-06 04:15:35.945+0000: 14072: debug : 
virStorageFileBackendFileInit:1441 : initializing FS storage file 
0x7f6aa4009000 (file:/var/lib/one//datastores/0/38/disk.1)[9869:9869]
2016-04-06 04:15:35.954+0000: 14072: error : 
virStorageFileBackendFileGetUniqueIdentifier:1523 : can't canonicalize 
path '/var/lib/one//datastores/0/38/disk.1':

https://www.redhat.com/archives/libvir-list/2014-May/msg00194.html

Comment is: "The current implementation works for local
storage only and returns the canonical path of the volume."

But it seems the logic is applied to NFS mounts. Perhaps it shouldn't 
be?  Anyway to get around this problem?  This is CentOS 7 .

Cheers,
Tom K.
------------------------------------------------------------------------------------- 

Living on earth is expensive, but it includes a free trip around the sun.




More information about the libvirt-users mailing list