[libvirt-users] How to enable apparmor security driver for libvirt

Jackie hzguanqiang at gmail.com
Fri Nov 21 09:53:38 UTC 2014


Hi guys,

I want to enable apparmor security driver for my libvirt env with ubuntu os.

What I do is as following:

First, I got the source code and compile it.
ubuntu at ubuntu:~/github$git clone git://libvirt.org/libvirt.git
ubuntu at ubuntu:~/github/libvirt$ dpkg -l|grep apparmor
ii apparmor 2.8.95~2430-0ubuntu5 amd64 User-space parser utility for
AppArmor
ii libapparmor-dev:amd64 2.8.95~2430-0ubuntu5.1 amd64 AppArmor
development libraries and header files
ii libapparmor-perl 2.8.95~2430-0ubuntu5 amd64 AppArmor library Perl
bindings
ii libapparmor1:amd64 2.8.95~2430-0ubuntu5.1 amd64 changehat AppArmor
library

ubuntu at ubuntu:~/github/libvirt$./autogen.sh --system --with-apparmor
ubuntu at ubuntu:~/github/libvirt$make -j8
ubuntu at ubuntu:~/github/libvirt$sudo make install

Then I configure the apparmor (security_driver = "apparmor") in
/etc/libvirt/qemu.conf, and restart libvirtd.

I thought this may be ok. But it turned out that apparmor security
driver is not loaded for my libvirt:

The output of "virsh capabilities | grep apparmor" is None.

What's the problem?


Best Regards~
Jackie




More information about the libvirt-users mailing list