创建kvm时提示Permission denied

[root@localhost~]# virt-install –name dt_pxe –ram 8192 –vcpus=16 –disk path=/home/vm_test.img –cdrom /gaodi/iso/CentOS.iso –network=bridge:br-def,virtualport_type=openvswitch,model=virtio –os-type=linux –graphics vnc,listen=0.0.0.0 –boot cdrom

Starting install…
ERROR internal error: process exited while connecting to monitor: 2019-10-19T06:10:38.446209Z qemu-system-x86_64: -drive file=/gaodi/CentOS.iso,if=none,id=drive-ide0-0-1,readonly=on,format=raw: Could not open ‘/gaodi/CentOS.iso’: 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 dt_pxe
otherwise, please restart your installation.
解决方法:给iso的父目录设置x权限,如果文件在多级目录下,要给每级目录都设置x属性。
[root@localhost~]# chmod 755 /gaodi/iso

[root@localhost~]# chmod 755 /gaodi

再重新启动就不会报错了。

    原文作者:gaodi2002
    原文地址: https://blog.51cto.com/gaodi2002/2443818
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞