如何修复 libvirt 与主机共享目录:Permission denied / Operation not permitted 错误
在虚拟机定义 XML 中,你必须为共享目录选择 accessmode='mapped':
注意 <target dir='mylabel'/> 不是 虚拟机上的目录而是任意标签:
在 /etc/libvirt/qemu.conf 中你必须添加以下配置(默认情况下,它们被注释掉了):
此外,在虚拟机的 /etc/fstab 中添加以下内容:
这里:
mylabel是你在虚拟机定义 XML 中使用的标签/data是虚拟机上共享目录将挂载到的目录9p是文件系统(即驱动程序)类型
Check out similar posts by category:
Virtualization
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow