<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 01/23/2014 08:57 PM, Otavio Rodolfo
      Piske wrote:<br>
    </div>
    <blockquote
cite="mid:CAGnUD6uvmm4uL2ZpUw-wvPfsMYAVnQpiOLP-D2wLkSFqjqFFrA@mail.gmail.com"
      type="cite">
      <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>
          &nbsp; "/var/log/libvirt/**/ubuntu_12_04.log" w,<br>
          &nbsp; "/var/lib/libvirt/**/ubuntu_12_04.monitor" rw,<br>
          &nbsp; "/var/run/libvirt/**/ubuntu_12_04.pid" rwk,<br>
          &nbsp; "/run/libvirt/**/ubuntu_12_04.pid" rwk,<br>
          &nbsp; "/var/run/libvirt/**/*.tunnelmigrate.dest.ubuntu_12_04" rw,<br>
          &nbsp; "/run/libvirt/**/*.tunnelmigrate.dest.ubuntu_12_04" rw,<br>
          &nbsp;
          "/var/lib/libvirt/images/d020c07a-b8d5-40f3-b02b-3df5ed6d06b3-0.img"
          rw,<br>
          &nbsp; "/home/orpiske/vms/isos/ubuntu-12.04.3-desktop-i386.iso" r,<br>
          &nbsp; # don't audit writes to readonly files<br>
          &nbsp; deny
          "/home/orpiske/vms/isos/ubuntu-12.04.3-desktop-i386.iso" 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's unable to
          load/recreate (?) the profile.<br>
        </div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <br>
    Do you mean libvirt blocks domain name with those characters?<br>
    <br>
    As Cristian mentioned, it seems to be a Ubuntu only problem.<br>
    <br>
    Which Ubuntu version are you using?<br>
    What is the libvirt version?<br>
    <br>
    I find this problem on Ubuntu 12.10 and libvirt 0.9.13<br>
    <br>
    alinefm@alinefm:~/libvirt$ libvirtd --version<br>
    libvirtd (libvirt) 0.9.13<br>
    <br>
    But I've just checked the latest libvirt (from source code) on same
    Ubuntu node and I was able to create and start a domain (which name
    contains spaces)<br>
    The current upstream version is 1.2.1<br>
    <br>
    alinefm@alinefm:~/libvirt$ sudo ./daemon/libvirtd -d<br>
    alinefm@alinefm:~/libvirt$ sudo tools/virsh -c qemu:///system<br>
    Welcome to lt-virsh, the virtualization interactive terminal.<br>
    <br>
    Type:&nbsp; 'help' for help with commands<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'quit' to quit<br>
    <br>
    virsh # list --all<br>
    &nbsp;Id&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State<br>
    ----------------------------------------------------<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; fedora18-iso-stream&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; Fedora19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; openSUSE-13-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; RHEL6.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; Ubuntu13-10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    &nbsp;-&nbsp;&nbsp;&nbsp;&nbsp; with spaces&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shut off<br>
    <br>
    virsh # start 'with spaces'<br>
    Domain with spaces started<br>
    <br>
    virsh # destroy 'with spaces'<br>
    Domain with spaces destroyed<br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CAGnUD6uvmm4uL2ZpUw-wvPfsMYAVnQpiOLP-D2wLkSFqjqFFrA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <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 moz-do-not-send="true"
              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&iacute;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
                  moz-do-not-send="true"
href="https://github.com/kimchi-project/kimchi/issues/306#issuecomment-33068988"
                  target="_blank">https://github.com/kimchi-project/kimchi/issues/306#issuecomment-33068988</a>),
                I don't think having a space in a VM's name is a
                problem. I am able to create a VM named "hello world"
                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'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 "libvirtError: internal error cannot load
            AppArmor profile"<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: "Otavio R. Piske" &lt;<a moz-do-not-send="true"
                    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, '-', '.' or '_'.<br>
                  <br>
                  Signed-off-by: Otavio R. Piske &lt;<a
                    moz-do-not-send="true"
                    href="mailto:angusyoung@gmail.com" target="_blank">angusyoung@gmail.com</a>&gt;<br>
                </blockquote>
                <br>
              </div>
              _______________________________________________<br>
              Kimchi-devel mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:Kimchi-devel@ovirt.org" target="_blank">Kimchi-devel@ovirt.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel"
                target="_blank">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a><br>
              <br>
            </blockquote>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Otavio R. Piske<br>
        <a moz-do-not-send="true" href="http://orpiske.net"
          target="_blank">http://orpiske.net</a><br>
      </div>
    </blockquote>
    <br>
  </body>
</html>