我正在使用virsh attatch-disk
将新设备添加到 KVM 下正在运行的来宾:
# virsh attatch-disk <running-guest-id> --source c.raw --target vdb
输出是:
error: Failed to attach disk
error: Failed to open file 'c.raw': No such file or directory
但是新的磁盘文件在 pwd 下:
ls -l
total 26653060
-rw-r--r--. 1 root root 8312913920 Jan 10 10:25 c.q
-rw-r--r--. 1 root root 53687091200 Jan 5 16:50 c.raw
-rw-r--r--. 1 root root 10759023104 Jan 6 02:14 c.VHD
为什么virsh打开失败?我浏览了 libvirtd.log:
2017-01-14 15:22:00.954+0000: 2204: error : virStorageFileGetMetadataRecurse:952 : Failed to open file 'c.raw': No such file or directory
2017-01-14 15:22:08.310+0000: 2209: info : remoteDispatchAuthList:2432 : Bypass polkit auth for privileged client pid:1921,uid:0
日志是什么意思?
virsh --version
0.10.2
qemu-x86_64 -version
qemu-x86_64 version 2.4.1, Copyright (c) 2003-2008 Fabrice Bellard