<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hello,<br /><br />I've been trying to boot a VM with the rootfs being a 9P share from the host. The VM OS is centos 7.<br />The OS boots but no services can work and it appears that the authentication system is broken.<br /><br />Now the funny thing is that booting the same OS on the same 9P share manually with Qemu works as expected with a fully functionnal OS... So I'm wondering what could libvirt do that render the OS on the share broken - Something with rights ?<br />Selinux is disabled on the host, and accessmode to the share is set to passthrough in both cases.<br /><br />Here's my working Qemu line:<br />qemu -kernel /srv/overlay/kernels/grsec-3.14.33-101/vmlinuz-3.14.33-101.el6.x86_64 \<br /> -initrd /srv/overlay/kernels/grsec-3.14.33-101/initramfs-3.14.33-101.el6.x86_64.img \<br /> -fsdev local,id=r,path=/srv/overlay/run/irc,security_model=passthrough \<br /> -device virtio-9p-pci,fsdev=r,mount_tag=root \<br /> -nographic \<br /> -m 256M \<br /> -machine pc-i440fx-2.1,accel=kvm \<br /> -netdev tap,id=net0 -device virtio-net,netdev=net0,mac=52:54:00:12:36:34 \<br /> -smp 1,sockets=1,cores=1 \<br /> -append 'root=virtfs:root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p console=ttyS0'<br /><br />And here my libvirt VM config:<br /><domain type='kvm'><br /> <name>irc</name><br /> <uuid>ffbd32eb-a693-eadd-8923-18de80137472</uuid><br /> <memory unit='KiB'>262144</memory><br /> <currentMemory unit='KiB'>262144</currentMemory><br /> <vcpu placement='static'>1</vcpu><br /> <os><br /> <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type><br /> <kernel>/srv/overlay/kernels/grsec-3.14.33-101/vmlinuz-3.14.33-101.el6.x86_64</kernel><br /> <initrd>/srv/overlay/kernels/grsec-3.14.33-101/initramfs-3.14.33-101.el6.x86_64.img</initrd><br /> <cmdline>root=virtfs:root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p</cmdline><br /> <boot dev='hd'/><br /> </os><br /> <features><br /> <acpi/><br /> <apic/><br /> <pae/><br /> </features><br /> <clock offset='utc'/><br /> <on_poweroff>destroy</on_poweroff><br /> <on_reboot>restart</on_reboot><br /> <on_crash>restart</on_crash><br /> <devices><br /> <emulator>/usr/bin/qemu-system-x86_64</emulator><br /> <controller type='usb' index='0'><br /> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/><br /> </controller><br /> <controller type='pci' index='0' model='pci-root'/><br /> <filesystem type='mount' accessmode='passthrough'><br /> <source dir='/srv/overlay/run/irc'/><br /> <target dir='root'/><br /> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/><br /> </filesystem><br /> <interface type='bridge'><br /> <mac address='52:54:00:00:36:34'/><br /> <source bridge='br0'/><br /> <model type='virtio'/><br /> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br /> </interface><br /> <serial type='pty'><br /> <target port='0'/><br /> </serial><br /> <console type='pty'><br /> <target type='serial' port='0'/><br /> </console><br /> <input type='mouse' bus='ps2'/><br /> <input type='keyboard' bus='ps2'/><br /> <graphics type='vnc' port='-1' autoport='yes'/><br /> <video><br /> <model type='cirrus' vram='9216' heads='1'/><br /> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/><br /> </video><br /> <memballoon model='virtio'><br /> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/><br /> </memballoon><br /> </devices><br /></domain><br /><br /><br />My libvirt version is 1.2.9, and qemu is 2.1.2.<br /><br />Thanks for your help,<br /><br />Olivier<br /><br /></p>
<div> </div>
</body></html>