Comment 3 for bug 665531

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: [lucid] libvirt does not support format=host_device

Actually, I see the problem:
$ cat /tmp/tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 0
libvir: Domain Config error : internal error unknown disk format 'host_device' for /dev/virtual/tserver
virt-aa-helper: error: invalid VM definition

$ cat /tmp/tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 1
libvir: Domain Config error : internal error unknown disk format 'host_device' for /dev/virtual/tserver
virt-aa-helper: error: invalid VM definition

If you change tserver.xml to use:
      <driver name='qemu' type='raw'/>

instead of:
      <source dev='/dev/virtual/tserver'/>

It works as expected:
$ cat /tmp/tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 0
virt-aa-helper: warning: path does not exist, skipping file type checks
14:21:55.082: warning : virDomainDiskDefForeachPath:5456 : Ignoring open failure on /dev/virtual/tserver: No such file or directory
virt-aa-helper:
/etc/apparmor.d/libvirt/libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2.files
virt-aa-helper:
  "/var/log/libvirt/**/tserver.log" w,
  "/var/lib/libvirt/**/tserver.monitor" rw,
  "/var/run/libvirt/**/tserver.pid" rwk,
  "/dev/virtual/tserver" rw,

$ cat /tmp/tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 1
virt-aa-helper: warning: path does not exist, skipping file type checks
14:22:11.852: warning : virDomainDiskDefForeachPath:5456 : Ignoring open failure on /dev/virtual/tserver: No such file or directory
virt-aa-helper:
/etc/apparmor.d/libvirt/libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2.files
virt-aa-helper:
  "/var/log/libvirt/**/tserver.log" w,
  "/var/lib/libvirt/**/tserver.monitor" rw,
  "/var/run/libvirt/**/tserver.pid" rwk,
  "/dev/virtual/tserver" rw,

libvirt 0.8.3 from Ubuntu 10.10 doesn't support host_device at all:
$ cat ./tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 0
virt-aa-helper: error: invalid VM definition

$ cat ./tserver.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid libvirt-c04cd76d-029b-7644-13ab-c2d144543ea2 --dryrun -p 1
virt-aa-helper: error: invalid VM definition