<div dir="ltr"><div>I see your point. I did a quick research and it seems to be a limitation on virt-aa-helper: <br><br>root@orpiske:/etc/libvirt/qemu# cat ubuntu_12_04\ with\ spaces.xml | /usr/lib/libvirt/virt-aa-helper -d -p 0 -r -u libvirt-61d77fad-bb1f-49fa-93e1-2b70a5cb8f4c ; echo $?<br>

virt-aa-helper: error: bad name<br>virt-aa-helper: error: could not get VM definition<br>1<br><br>Whereas, this works:<br><br>root@orpiske:/etc/libvirt/qemu# cat ubuntu_12_04.xml | /usr/lib/libvirt/virt-aa-helper -d -p 0 -r -u libvirt-d020c07a-b8d5-40f3-b02b-3df5ed6d06b3 ; echo $?<br>

virt-aa-helper:<br>/etc/apparmor.d/libvirt/libvirt-d020c07a-b8d5-40f3-b02b-3df5ed6d06b3.files<br>virt-aa-helper:<br>  &quot;/var/log/libvirt/**/ubuntu_12_04.log&quot; w,<br>  &quot;/var/lib/libvirt/**/ubuntu_12_04.monitor&quot; rw,<br>

  &quot;/var/run/libvirt/**/ubuntu_12_04.pid&quot; rwk,<br>  &quot;/run/libvirt/**/ubuntu_12_04.pid&quot; rwk,<br>  &quot;/var/run/libvirt/**/*.tunnelmigrate.dest.ubuntu_12_04&quot; rw,<br>  &quot;/run/libvirt/**/*.tunnelmigrate.dest.ubuntu_12_04&quot; rw,<br>

  &quot;/var/lib/libvirt/images/d020c07a-b8d5-40f3-b02b-3df5ed6d06b3-0.img&quot; rw,<br>  &quot;/home/orpiske/vms/isos/ubuntu-12.04.3-desktop-i386.iso&quot; r,<br>  # don&#39;t audit writes to readonly files<br>  deny &quot;/home/orpiske/vms/isos/ubuntu-12.04.3-desktop-i386.iso&quot; w,<br>

<br>0<br><br></div><div>I decided to dig further and I took a look at virt-aa-helper source code and it does, indeed, check if the name does not contain spaces (as well as one of /, [, ] and *). Because of that, it seems that it&#39;s unable to load/recreate (?) the profile.<br>

</div><div><br></div><div>Does it make sense to you? And, if yes, what would you suggest as an appropriate work-around in this case?<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 5:48 PM, Aline Manera <span dir="ltr">&lt;<a href="mailto:alinefm@linux.vnet.ibm.com" target="_blank">alinefm@linux.vnet.ibm.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 01/22/2014 07:19 PM, Crístian Viana wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As I added to the GitHub issue page (<a href="https://github.com/kimchi-project/kimchi/issues/306#issuecomment-33068988" target="_blank">https://github.com/kimchi-<u></u>project/kimchi/issues/306#<u></u>issuecomment-33068988</a>), I don&#39;t think having a space in a VM&#39;s name is a problem. I am able to create a VM named &quot;hello world&quot; using Kimchi and virsh.<br>


<br>
We should not add a limitation like this one to Kimchi (i.e. restricting the VM name) if there&#39;s not a real reason to.<br>
</blockquote>
<br></div>
Agree.<br>
<br>
Seems this problem is on a deeper layer.<br>
In a quick search on the internet I found a lot of forums related to &quot;libvirtError: internal error cannot load AppArmor profile&quot;<br>
We need to investigate more to find the root cause.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Am 22-01-2014 19:01, schrieb Otavio R. Piske:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: &quot;Otavio R. Piske&quot; &lt;<a href="mailto:angusyoung@gmail.com" target="_blank">angusyoung@gmail.com</a>&gt;<br>
<br>
Kimchi fails to start the guest OS if the user names it with spaces. As pointed in the issue #306, other VM management interfaces prevent the user from creating a guest OS if the name contain invalid characters.<br>
<br>
This patch adds a validation logic that prevents the user from naming a Guest OS with anything other than alphanumeric chars, &#39;-&#39;, &#39;.&#39; or &#39;_&#39;.<br>
<br>
Signed-off-by: Otavio R. Piske &lt;<a href="mailto:angusyoung@gmail.com" target="_blank">angusyoung@gmail.com</a>&gt;<br>
</blockquote>
<br></div>
______________________________<u></u>_________________<br>
Kimchi-devel mailing list<br>
<a href="mailto:Kimchi-devel@ovirt.org" target="_blank">Kimchi-devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel" target="_blank">http://lists.ovirt.org/<u></u>mailman/listinfo/kimchi-devel</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Otavio R. Piske<br><a href="http://orpiske.net" target="_blank">http://orpiske.net</a><br>
</div>