<div dir="ltr"><div><br><br><br>On Mon, Mar 24, 2014 at 11:23 AM, Juerg Haefliger &lt;<a href="mailto:juergh@gmail.com">juergh@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Sat, Mar 22, 2014 at 11:46 AM, Daniel J Walsh &lt;<a href="mailto:dwalsh@redhat.com">dwalsh@redhat.com</a>&gt; wrote:<br>
&gt; &gt;<br>&gt; &gt; -----BEGIN PGP SIGNED MESSAGE-----<br>&gt; &gt; Hash: SHA1<br>&gt; &gt;<br>&gt; &gt; On 03/21/2014 10:36 AM, Juerg Haefliger wrote:<br>&gt; &gt; &gt; Hi,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I started a VM using the official F20 cloud image, installed libvirt and<br>
&gt; &gt; &gt; its dependencies and tried to create a guest but SELinux won&#39;t let me:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; [root@fedora-20 ~]# virsh create mini.xml error: Failed to create domain<br>&gt; &gt; &gt; from mini.xml error: Input/output error<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; [root@fedora-20 ~]# journalctl | tail Mar 21 14:23:06 fedora-20 systemd[1]:<br>&gt; &gt; &gt; SELinux policy denies access. Mar 21 14:23:06 fedora-20<br>&gt; &gt; &gt; systemd-machined[7210]: Failed to start machine scope: Access denied Mar 21<br>
&gt; &gt; &gt; 14:23:06 fedora-20 libvirtd[6856]: Input/output error<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; [root@fedora-20 ~]# cat /var/log/libvirt/qemu/mini.log 2014-03-21<br>&gt; &gt; &gt; 14:23:06.740+0000: starting up LC_ALL=C<br>
&gt; &gt; &gt; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none<br>&gt; &gt; &gt; /usr/bin/qemu-system-x86_64 -name mini -S -machine<br>&gt; &gt; &gt; pc-i440fx-1.6,accel=tcg,usb=off -m 1024 -realtime mlock=off -smp<br>
&gt; &gt; &gt; 1,sockets=1,cores=1,threads=1 -uuid 11111111-2890-2015-1f87-cbfa725b1dd3<br>&gt; &gt; &gt; -nographic -no-user-config -nodefaults -chardev<br>&gt; &gt; &gt; socket,id=charmonitor,path=/var/lib/libvirt/qemu/mini.monitor,server,nowait<br>
&gt; &gt; &gt; -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown<br>&gt; &gt; &gt; -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device<br>&gt; &gt; &gt; virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 2014-03-21<br>
&gt; &gt; &gt; 14:23:06.744+0000: shutting down<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; type=VIRT_MACHINE_ID msg=audit(1395412399.728:281): pid=6856 uid=0<br>&gt; &gt; &gt; auid=4294967295 ses=4294967295<br>
&gt; &gt; &gt; subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu vm=&quot;mini&quot;<br>&gt; &gt; &gt; uuid=11111111-2890-2015-1f87-cbfa725b1dd3<br>&gt; &gt; &gt; vm-ctx=system_u:system_r:svirt_tcg_t:s0:c728,c986<br>
&gt; &gt; &gt; img-ctx=system_u:object_r:svirt_image_t:s0:c728,c986 model=selinux<br>&gt; &gt; &gt; exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=success&#39;<br>&gt; &gt; &gt; type=VIRT_MACHINE_ID msg=audit(1395412399.728:282): pid=6856 uid=0<br>
&gt; &gt; &gt; auid=4294967295 ses=4294967295<br>&gt; &gt; &gt; subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu vm=&quot;mini&quot;<br>&gt; &gt; &gt; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 vm-ctx=107:107 img-ctx=107:107<br>
&gt; &gt; &gt; model=dac exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=?<br>&gt; &gt; &gt; res=success&#39; type=USER_AVC msg=audit(1395412399.788:283): pid=1 uid=0<br>&gt; &gt; &gt; auid=4294967295 ses=4294967295  subj=system_u:system_r:init_t:s0 msg=&#39;avc:<br>
&gt; &gt; &gt; denied  { start } for auid=-1 uid=-1 gid=-1<br>&gt; &gt; &gt; scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0<br>&gt; &gt; &gt; tclass=service exe=&quot;/usr/lib/systemd/systemd&quot; sauid=0 hostname=? addr=?<br>
&gt; &gt; &gt; terminal=?&#39; type=VIRT_RESOURCE msg=audit(1395412400.015:284): pid=6856<br>&gt; &gt; &gt; uid=0 auid=4294967295 ses=4294967295<br>&gt; &gt; &gt; subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu resrc=mem<br>
&gt; &gt; &gt; reason=start vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 old-mem=0<br>&gt; &gt; &gt; new-mem=1048576 exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=?<br>&gt; &gt; &gt; res=success&#39; type=VIRT_RESOURCE msg=audit(1395412400.015:285): pid=6856<br>
&gt; &gt; &gt; uid=0 auid=4294967295 ses=4294967295<br>&gt; &gt; &gt; subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu resrc=vcpu<br>&gt; &gt; &gt; reason=start vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 old-vcpu=0<br>
&gt; &gt; &gt; new-vcpu=1 exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=?<br>&gt; &gt; &gt; res=success&#39; type=VIRT_CONTROL msg=audit(1395412400.015:286): pid=6856<br>&gt; &gt; &gt; uid=0 auid=4294967295 ses=4294967295<br>
&gt; &gt; &gt; subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu op=start<br>&gt; &gt; &gt; reason=booted vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 vm-pid=-1<br>&gt; &gt; &gt; exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=failed&#39;<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; I&#39;m not overly familiar with SELinux. Is this a configuration issue? Am I<br>&gt; &gt; &gt; missing some policy packages or could this be an issue with the cloud<br>&gt; &gt; &gt; image?<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; Works fine when I disable SELinux.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Google found this, but it&#39;s old and apparently resolved:<br>&gt; &gt; &gt; <a href="https://bugzilla.redhat.com/show_bug.cgi?id=860235">https://bugzilla.redhat.com/show_bug.cgi?id=860235</a><br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; Thanks ...Juerg<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________ cloud mailing list<br>&gt; &gt; &gt; <a href="mailto:cloud@lists.fedoraproject.org">cloud@lists.fedoraproject.org</a><br>
&gt; &gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/cloud">https://admin.fedoraproject.org/mailman/listinfo/cloud</a> Fedora Code of<br>&gt; &gt; &gt; Conduct: <a href="http://fedoraproject.org/code-of-conduct">http://fedoraproject.org/code-of-conduct</a><br>
&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; There is no SELinux data that you posted.  I don&#39;t think your machine is<br>&gt; &gt; mislabeled.  Doing the /.autorelabel dance is a waste of time.<br>&gt; &gt;<br>&gt; &gt; ausearch -m avc,user_avc -ts recent<br>
&gt; &gt;<br>&gt; &gt; After you have the problem, to see if SELinux posted any error messages.<br>&gt; &gt;<br>&gt; &gt; If there are no messages then try to turn off dontaudit rules.<br>&gt; &gt;<br>&gt; &gt; semodule -DB<br>
&gt; &gt; Run your test<br>&gt; &gt; ausearch -m avc,user_avc -ts recent<br>&gt; &gt;<br>&gt;<br>&gt; This is all I get:<br>&gt;<br>&gt; time-&gt;Mon Mar 24 10:21:18 2014<br>&gt; type=USER_AVC msg=audit(1395656478.686:22577): pid=1 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:init_t:s0 msg=&#39;avc:  denied  { start } for auid=-1 uid=-1 gid=-1 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=service  exe=&quot;/usr/lib/systemd/systemd&quot; sauid=0 hostname=? addr=? terminal=?&#39;<br>
<br><br></div>And all of &#39;ausearch -ts&#39;:<br><br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=VIRT_MACHINE_ID msg=audit(1395656781.041:22605): pid=529 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 vm-ctx=system_u:system_r:svirt_tcg_t:s0:c135,c495 img-ctx=system_u:object_r:svirt_image_t:s0:c135,c495 model=selinux exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=success&#39;<br>
----<br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=VIRT_MACHINE_ID msg=audit(1395656781.041:22606): pid=529 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 vm-ctx=107:107 img-ctx=107:107 model=dac exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=success&#39;<br>
----<br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=USER_AVC msg=audit(1395656781.044:22607): pid=1 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:init_t:s0 msg=&#39;avc:  denied  { start } for auid=-1 uid=-1 gid=-1 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=service  exe=&quot;/usr/lib/systemd/systemd&quot; sauid=0 hostname=? addr=? terminal=?&#39;<br>
----<br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=VIRT_RESOURCE msg=audit(1395656781.285:22608): pid=529 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu resrc=mem reason=start vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 old-mem=0 new-mem=1048576 exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=success&#39;<br>
----<br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=VIRT_RESOURCE msg=audit(1395656781.285:22609): pid=529 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu resrc=vcpu reason=start vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 old-vcpu=0 new-vcpu=1 exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=success&#39;<br>
----<br>time-&gt;Mon Mar 24 10:26:21 2014<br>type=VIRT_CONTROL msg=audit(1395656781.286:22610): pid=529 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg=&#39;virt=qemu op=start reason=booted vm=&quot;mini&quot; uuid=11111111-2890-2015-1f87-cbfa725b1dd3 vm-pid=-1 exe=&quot;/usr/sbin/libvirtd&quot; hostname=? addr=? terminal=? res=failed&#39;<br>
<br><div><br>&gt;<br>&gt;  <br>&gt;<br>&gt; &gt; And look for messages about virt.<br>&gt; &gt;<br>&gt; &gt; This will turn dontaudit rules back on.<br>&gt; &gt; semodule -B<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; -----BEGIN PGP SIGNATURE-----<br>
&gt; &gt; Version: GnuPG v1<br>&gt; &gt; Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/">http://www.enigmail.net/</a><br>&gt; &gt;<br>&gt; &gt; iEYEARECAAYFAlMtahAACgkQrlYvE4MpobPh4ACgymOncdUt6k7+Z5BwJObOmyLx<br>
&gt; &gt; hJUAn08Uow4Qh7KWL+Qg+F14ikr52ktE<br>&gt; &gt; =TMxx<br>&gt; &gt; -----END PGP SIGNATURE-----<br>&gt; &gt; _______________________________________________<br>&gt; &gt; cloud mailing list<br>&gt; &gt; <a href="mailto:cloud@lists.fedoraproject.org">cloud@lists.fedoraproject.org</a><br>
&gt; &gt; <a href="https://admin.fedoraproject.org/mailman/listinfo/cloud">https://admin.fedoraproject.org/mailman/listinfo/cloud</a><br>&gt; &gt; Fedora Code of Conduct: <a href="http://fedoraproject.org/code-of-conduct">http://fedoraproject.org/code-of-conduct</a><br>
&gt;<br></div></div>