Still occurs on Ubuntu 14.04 using libvirt 1.2.2 . Here are my reproduction steps.
Try with " " in <name>: $ tar -xvf my-vm.tar.gz my-vm/ my-vm/my-vm-data.qcow2.md5 my-vm/my-vm.xml $ cd my-vm/ # <name> has space $ grep -Fe '<name>' -- my-vm.xml <name>My VM</name> $ sudo virsh define my-vm.xml Domain My VM defined from my-vm.xml # BUG: fails to start $ sudo virsh start "My VM" error: Failed to start domain My VM error: internal error: cannot load AppArmor profile 'libvirt-1a2ef3c1-a758-40f6-a238-c84ef3e8c9d6' Remove bad KVM: $ sudo virsh undefine "My VM" Domain My VM has been undefined Try again without " ", use "-": $ vim my-vm.xml # <name> without spaces $ grep -Fe '<name>' -- my-vm.xml <name>My-VM</name> $ sudo virsh define my-vm.xml Domain My-VM defined from my-vm.xml # starts $ sudo virsh start "My-VM" Using software versions $ sudo dpkg -l | grep libvirt ii libvirt-bin 1.2.2-0ubuntu13.1.16 amd64 programs for the libvirt library ii libvirt0 1.2.2-0ubuntu13.1.16 amd64 library for interfacing with different virtualization systems ii python-libvirt 1.2.2-0ubuntu2 amd64 libvirt Python bindings $ sudo uname -a Linux localhost 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a Description: Ubuntu 14.04.3 LTS -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/799997 Title: Error generating apparmor profile when hostname contains spaces To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/799997/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs