qemu: error: Cannot access storage file
阿新 • • 發佈:2018-12-28
[[email protected] ~]# virsh start k8s-1
error: Failed to start domain k8s-1
error: Cannot access storage file '/home/zeng/k8s-1_vdd.qcow2' (as uid:107, gid:107): Permission denied
error: Failed to start domain k8s-1
error: Cannot access storage file '/home/zeng/k8s-1_vdd.qcow2' (as uid:107, gid:107): Permission denied
[[email protected] ~]# virsh start k8s-1
error: Failed to start domain k8s-1
error: internal error: qemu unexpectedly closed the monitor: 2018-07-02T16:58:09.090157Z qemu-kvm: -chardev pty,id=charserial0: char device redirected to /dev/pts/4 (label charserial0)
2018-07-02T16:58:09.098344Z qemu-kvm: -drive file=/home/zeng/k8s-1.qcow2,format=qcow2,if=none,id=drive-virtio-disk0: Could not open '/home/zeng/k8s-1.qcow2': Permission denied
解決方案:
https://github.com/jedi4ever/veewee/issues/996
Encountered same issue, after digging ACL issue, I have to grant supplementary right on my HOME [email protected]:~/kubernet $ sudo getfacl -e /home/murlock getfacl: Removing leading '/' from absolute path names # file: home/murlock # owner: murlock # group: murlock user::rwx user:libvirt-qemu:--x #effective:--- group::--- #effective:--- mask::--- other::---
[email protected]:~/kubernet $ sudo setfacl -m u:libvirt-qemu:rx /home/murlock [email protected]:~/kubernet $ sudo getfacl -e /home/murlock getfacl: Removing leading '/' from absolute path names # file: home/murlock # owner: murlock # group: murlock user::rwx user:libvirt-qemu:r-x #effective:r-x group::--- #effective:--- mask::r-x other::---