当我尝试从 libvirt 启动虚拟机(从命令行或使用 virt-manager 到本地 qemu-kvm)时,我正在使用 Linux Mint Debian Edition(Up.8),当我使用未加载的映像时,我收到此错误在默认数据存储中:
如果我将相同的图像(在本例中为 .iso 文件)复制到 /var/lib/libvirt/images 文件夹,它就可以工作。
我尝试将其 chown 和 chmod 到每个可能的所有者和模式,但它不起作用。
SELinux 在这个发行版中没有到位,所以我不知道重点在哪里,在日志中我可以看到权限被拒绝,我陷入了困境。
Impossibile completare l'installazione: 'internal error: process exited while connecting to monitor: qemu-system-x86_64: -drive file=/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso: Could not open '/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso': Permission denied
'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 1949, in do_install
guest.start_install(False, meter=meter)
File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1249, in start_install
noboot)
File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1317, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2897, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -drive file=/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso: Could not open '/home/penzo/Scaricati/elementaryos-stable-amd64.20130810.iso': Permission denied
有什么线索吗?
答案1
用户libvirt-qemu
必须能够访问该目录/home/penzo/Scaricati/
,而不仅仅是其中的文件。