創建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

再重新啓動就不會報錯了。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章