Can you thoroughly test libvirt 0.7.0-1ubuntu8 with eucalyptus? I fixed
this bug properly along with attach and detach of devices and disks
(using Jaunty kvm as you mentioned in bug #432154). Please make sure
that the workaround rules in /etc/apparmor.d/abstractions/libvirt-qemu
are no longer present (if the are and you removed them, be sure to
shutdown and start the VMs to make sure the updated profile is in
effect).

Specifically, I tested:
$ dd if=/dev/zero of=/tmp/foo.img bs=1M count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 0.182175 s, 368 MB/s

$ cat > /tmp/431090.xml << EOM
<disk type='block'>
  <driver name='phy'/>
  <source dev='/tmp/foo.img'/>
  <target dev='sdb'/>
</disk>
EOM

$ virsh attach-device <vm name> /tmp/431090.xml
...
Device attached successfully

$ cat /etc/apparmor.d/libvirt/libvirt-<vm uuid>.files | grep 'foo'
  "/tmp/foo.img" rw,

$ virsh detach-device <vm name> /tmp/431090.xml
...
Device detached successfully


$ cat /etc/apparmor.d/libvirt/libvirt-<vm uuid>.files | grep 'foo'
$

$ virsh attach-disk test1 /tmp/foo.img sdc --driver file
...
Disk attached successfully

$  cat /etc/apparmor.d/libvirt/libvirt-<vm uuid>.files | grep 'foo'
  "/tmp/foo.img" rw,

$ virsh detach-disk test1 sdc
...
Disk detached successfully

$ cat /etc/apparmor.d/libvirt/libvirt-<vm uuid>.files | grep 'foo'
$

For good measure, I also added a USB disk with virt-manager while a VM
was running and the disk was added to
/etc/apparmor.d/libvirt/libvirt-<vm uuid>.files and accessible in the VM
via fdisk. I wasn't sure how to add a USB disk using virsh.

Hopefully, eucalyptus will now be fully supported (and protected! :) by
the AppArmor security driver.

-- 
libvirt apparmor profile is preventing libvirt from running eucalyptus VMs
https://bugs.launchpad.net/bugs/431090
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to