我正在进行 Debian 测试。
我正在尝试在位于 ext4 格式的 USB 记忆棒上的存储上安装虚拟机。但是,在安装操作系统之前我遇到了权限错误。我正在使用虚拟机管理器:
Unable to complete install: 'Cannot access storage file '/media/user/mnt/generic.qcow2' (as uid:121, gid:131): Permission denied'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2288, in _do_async_install
guest.start_install(meter=meter)
File "/usr/share/virt-manager/virtinst/guest.py", line 461, in start_install
doboot, transient)
File "/usr/share/virt-manager/virtinst/guest.py", line 396, in _create_guest
self.domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3777, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: Cannot access storage file '/media/user/mnt/generic.qcow2' (as uid:121, gid:131): Permission denied
我使用以下命令安装了 USB:
sudo mount -t ext4 /dev/sdb1 /media/user/mnt -o rw
我还尝试chmod 777
在挂载 USB 时在挂载点以及存储文件本身(generic.qcow2)上进行操作。
此外,我将挂载点的所有者更改为 libvirt-qemu (uid=121),但错误仍然存在。
如何提供适当的权限才能安装操作系统?