Fedora
添加文件系統共享目錄 Fedora 27 後無法啟動域
我在我的 Fedora 27 主機上創建了一個 Fedora 27 來賓,添加了 2 個文件系統共享,在來賓/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
這可能不是全部,但它似乎有效(顯然我已經有了第一個命令……)。
來自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