添加文件系统共享目录后无法启动域 Fedora 27

添加文件系统共享目录后无法启动域 Fedora 27

我在 Fedora 27 主机上创建了一个 Fedora 27 来宾,添加了 2 个文件系统共享,在 guest/s fstab 中添加了条目,启动,一切正常。但是,当我尝试从主机“d_drive”添加另一个驱动器/安装时,出现以下错误,并且我不确定如何对其进行故障排除。据我所知,工作共享与有问题的 d_drive 具有相同的用户所有权和权限,并且从一个简单的“getfacl”来看,这些权限看起来也几乎相同,减去标志(我不明白)。

我从哪里/如何开始解决这个问题?

系统信息:

2017-12-20 19:51:36.813+0000: starting up libvirt version: 3.7.0, package: 3.fc27 (Fedora Project, 2017-12-04-17:14:09, buildhw-06.phx2.fedoraproject.org), qemu version: 2.10.1(qemu-2.10.1-1.fc27)

当我尝试启动域时,从 virt-manager gui 中:

Error starting domain: internal error: qemu unexpectedly closed the monitor: x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-32-f26-data/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x5 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
2017-12-20T19:37:54.023729Z qemu-system-x86_64: -chardev pty,id=ch

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1505, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1062, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: qemu unexpectedly closed the monitor: x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-32-f26-data/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x5 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
2017-12-20T19:37:54.023729Z qemu-system-x86_64: -chardev pty,id=ch

来自 /var/log/libvirt/qemu/f26-data.log

2017-12-20T19:51:36.979416Z qemu-system-x86_64: -device virtio-9p-pci,id=fs2,fsdev=fsdev-fs2,mount_tag=d_drive,bus=pci.0,addr=0xa: 9pfs Failed to initialize fs-driver with id:fsdev-fs2 and export path:/mnt/d_drive
2017-12-20 19:51:37.212+0000: shutting down, reason=failed

ACL 信息

getfacl: Removing leading '/' from absolute path names
# file: mnt/d_drive/
# owner: root
# group: root
user::rwx
group::rwx
other::r-x

...以及工作的“h_drive”共享

[root@brainiac-fedora ~]# getfacl /mnt/h_drive/
getfacl: Removing leading '/' from absolute path names
# file: mnt/h_drive/
# owner: root
# group: root
# flags: ss-
user::rwx
group::rwx
other::r-x

答案1

这可能不是全部,但它似乎有效(显然我已经有了第一个命令......)。

https://github.com/adrahon/vagrant-kvm/pull/125#issuecomment-38251664

[root@localhost ~]# sudo semanage fcontext -a -t virt_content_t "/mnt/d_drive(/.*)?"
ValueError: File context for /mnt/d_drive(/.*)? already defined
[root@localhost ~]# sudo restorecon -R /mnt/d_drive

相关内容