I use the code below:<br><br>import libvirt<br>auth = [[libvirt.VIR_CRED_AUTHNAME,libvirt.VIR_CRED_NOECHOPROMPT],'root',None]<br>conn = libvirt.openAuth("qemu:///system",auth,0)<br>with open("/root/cflinux.xml") as f:<br>
     xml=f.read()<br>domain = conn.defineXML(xml)<br>domain.createWithFlags(0)<br><br><br>and report the error:<br><br>libvir: Security Labeling error : internal error cannot load AppArmor profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'<br>
Traceback (most recent call last):<br>  File "a.py", line 7, in <module><br>    domain.createWithFlags(0)<br>  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in createWithFlags<br>
    if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)<br>libvirt.libvirtError: internal error cannot load AppArmor profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'<br><br clear="all">
<br>who can help me fix the error?What may cause the error?<br><br>Thanks.<br><br>-- <br>ÓŁ±¦±¦: <a href="http://www.xuanmingyi.com" target="_blank">http://www.xuanmingyi.com</a><br><br>