內部錯誤:process exited while connecting to monitor: qemu-system-x86_64報錯解決

錯誤: 內部錯誤:early end of file from monitor, possible problem: 2020-03-18T14:35:03.329327Z qemu-system-x86_64: -drive file=/image/ubuntu-134.qcow2,format=qcow2,if=none,id=drive-virtio-disk0: Could not open backing file: Could not open '/yang/image/ubuntu-16.04.raw': Permission denied

錯誤: 內部錯誤:process exited while connecting to monitor: 2020-03-18T14:35:03.329327Z qemu-system-x86_64: -drive file=/image/ubuntu-134.qcow2,format=qcow2,if=none,id=drive-virtio-disk0: Could not open backing file: Could not open '/yang/image/ubuntu-16.04.raw': Permission denied

+ virsh define ubuntu-122.xml
定義域 ubuntu-122(從 ubuntu-122.xml)
+ virsh start ubuntu-122
錯誤: 開始域 ubuntu-122 失敗
錯誤: 內部錯誤:process exited while connecting to monitor: 2020-03-17T11:46:39.835075Z qemu-system-x86_64: -drive file=/image/ubuntu-122.qcow2,format=qcow2,if=none,id=drive-virtio-disk0,cache=none: Could not open backing file: Could not open '/image/ubuntu-12.10.raw': Permission denied

筆者分別使用Ubuntu-12.10.raw 鏡像和Ubuntu-16.04.raw 批量創建qcow2鏡像虛擬機報如上報錯,因報權限問題,經多方查找資料,及兩個不同版本操作系統實測,懷疑是將raw鏡像放於root  屬主下級目錄導致。實測以下措施可解決

1、將鏡像移到片普通用戶任意二級目錄下
root@field_A0:/yang/image# ll ubuntu-16.04.raw*
-rwxrwxrwx 1 libvirt-qemu kvm 1610612730 3月  18 22:19 ubuntu-16.04.raw*
root@field_A0:/yang/image# cp ubuntu-16.04.raw /home/fieldyang/yang/.
root@field_A0:/home/fieldyang/yang# ll ubuntu-16.04.raw*
-rwxr-xr-x 1 libvirt-qemu kvm 16106127360 3月  18 22:59 ubuntu-16.04.raw*
root@field_A0:/home/fieldyang/yang#
2、修改屬主屬組爲root
root@field_A0:/home/fieldyang/yang# chown -R root:root ubuntu-16.04.raw*
3、修改創建命令中絕對路徑
#基於ubuntu-16.04.raw創建qcow2鏡像
qemu-img create -f qcow2 -o cluster_size=2M,backing_file=/home/fieldyang/yang/ubuntu-16.04.raw ubuntu-$ip.qcow2 50G

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