当我尝试启动 VM 时,出现以下错误(注意,主机是 OpenSUSE Leap 15.3):
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1281, in startup
self._backend.create()
File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1234, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: Internet Error: qemu unexpectedly closed the monitor: 2022-04-13T10:23:46.817809Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=/home/turbine,bus=pci.7,addr=0x0: cannot initialize fsdev 'fsdev-fs0': failed to open '/home/user/shared': Permission denied
我的共享文件夹配置给了我:
<filesystem type="mount" accessmode="passthrough">
<driver type="path" wrpolicy="immediate"/>
<source dir="/home/user/shared"/>
<target dir="/shared"/>
<address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
</filesystem>
答案1
结果是,该目录必须位于每个目录的路径中,然后才能由任何用户读取和搜索。