Fix starting qemu instances when apparmor driver is enabled
Fix starting qemu instances when apparmor driver is enabled

With the apparmor security driver enabled, qemu instances fail
to start

# grep ^security_driver /etc/libvirt/qemu.conf
security_driver = "apparmor"
# virsh start test-kvm
error: Failed to start domain test-kvm
error: internal error security label already defined for VM

The model field of virSecurityLabelDef object is always populated
by virDomainDefGetSecurityLabelDef(), so remove the check for a
NULL model when verifying if a label is already defined for the
instance.

Checking for a NULL model and populating it later in
AppArmorGenSecurityLabel() has been left in the code to be
consistent with virSecuritySELinuxGenSecurityLabel().

crobinso/libvirt,olafhering/libvirt,crobinso/libvirt,jfehlig/libvirt,taget/libvirt,rlaager/libvirt,nertpinx/libvirt,libvirt/libvirt,datto/libvirt,cbosdo/libvirt,cbosdo/libvirt,agx/libvirt,eskultety/libvirt,datto/libvirt,VenkatDatta/libvirt,eskultety/libvirt,agx/libvirt,elmarco/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,elmarco/libvirt,libvirt/libvirt,eskultety/libvirt,zippy2/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,shugaoye/libvirt,nertpinx/libvirt,libvirt/libvirt,elmarco/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,zhlcindy/libvirt-1.1.4-maintain,datto/libvirt,andreabolognani/libvirt,nertpinx/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,siboulet/libvirt-openvz,rlaager/libvirt,VenkatDatta/libvirt,rlaager/libvirt,jardasgit/libvirt,siboulet/libvirt-openvz,fabianfreyer/libvirt,eskultety/libvirt,shugaoye/libvirt,olafhering/libvirt,agx/libvirt,taget/libvirt,crobinso/libvirt,taget/libvirt,cbosdo/libvirt,datto/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,jfehlig/libvirt,jfehlig/libvirt,zippy2/libvirt,zippy2/libvirt,fabianfreyer/libvirt,taget/libvirt,rlaager/libvirt,shugaoye/libvirt,jardasgit/libvirt,rlaager/libvirt,crobinso/libvirt,andreabolognani/libvirt,shugaoye/libvirt,siboulet/libvirt-openvz,VenkatDatta/libvirt,olafhering/libvirt,olafhering/libvirt,elmarco/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,cbosdo/libvirt,cbosdo/libvirt,jardasgit/libvirt,agx/libvirt,andreabolognani/libvirt,elmarco/libvirt,shugaoye/libvirt,nertpinx/libvirt,libvirt/libvirt,jardasgit/libvirt,eskultety/libvirt,siboulet/libvirt-openvz,nertpinx/libvirt,zippy2/libvirt,agx/libvirt,taget/libvirt,andreabolognani/libvirt,zhlcindy/libvirt-1.1.4-maintain