[libvirt-users] command guest-file-open failed to open file - Permission denied

Michal Privoznik mprivozn at redhat.com
Sun Oct 30 21:25:39 UTC 2016


On 27.10.2016 11:50, 刘梦可 wrote:
> hello,
> 
> I am using  libvirt 1.2.17 on CentOS 7.2 - kernel
> 3.10.0-327.13.1.el7.x86_64. The command guest-file-open failed to open
> file with error "Permission denied", the detail is as below:
> 
> virsh qemu-agent-command instance-00000a9c
> '{"execute":"guest-file-open",
> "arguments":{"path":"/home/centos/test","mode":"r"}}'
> error: internal error: unable to execute QEMU agent command
> 'guest-file-open': failed to open file '/home/centos/test' (mode:
> 'r'): Permission denied
> 
> In the guest, the file '/home/centos/test' exist and the access
> permissions is 777 as below:
> -rwxrwxrwx. 1 centos centos 18 Oct 27 11:16 test

This is likely denied because of SELinux. You can check audit log to
confirm that. To fix this you need to change the label on the file and
to do that properly you need to add a rule.

Michal




More information about the libvirt-users mailing list