执行virt-install创建虚拟机时提示“ERROR Cannot access storage file 'xxxxx' (as uid:107, gid:107): Permission denied”。
[root@localhost ~]# virt-install --name=openeuler --vcpus=4 --ram=8192 --disk path=/home/kvm/images/openeuler.img,format=qcow2,size=100,bus=virtio --cdrom /home/kvm/openEuler-22.03-LTS-aarch64-dvd.iso --network bridge=virbr0,model=virtio --force --autostart --graphic vnc,listen=0.0.0.0,port=5906 --input type=tablet,bus=usb --input type=keyboard,bus=virtio WARNING /home/kvm/images/openeuler.img may not be accessible by the hypervisor. You will need to grant the 'qemu' user search permissions for the following directories: ['/home/kvm'] Starting install... ERROR Cannot access storage file '/home/kvm/images/openeuler.img' (as uid:107, gid:107): Permission denied Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start openeuler otherwise, please restart your installation.
sed -i 's/#group = "root"/group ="root"/g' /etc/libvirt/qemu.conf
[root@localhost ~]# sed -i 's/#group = "root"/group ="root"/g' /etc/libvirt/qemu.conf [root@localhost ~]# sed -i 's/#user = "root"/user ="root"/g' /etc/libvirt/qemu.conf [root@localhost ~]#