I use the code below:
import libvirt
auth
[[libvirt.VIR_CRED_AUTHNAME,libvirt.VIR_CRED_NOECHOPROMPT],'root',None]
conn = libvirt.openAuth("qemu:///system",auth,0)
with open("/root/cflinux.xml") as f:
xml=f.read()
domain = conn.defineXML(xml)
domain.createWithFlags(0)
and report the error:
libvir: Security Labeling error : internal error cannot load AppArmor
profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
Traceback (most recent call last):
File "a.py", line 7, in <module>
domain.createWithFlags(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in
createWithFlags
if ret == -1: raise libvirtError ('virDomainCreateWithFlags()
failed',
dom=self)
libvirt.libvirtError: internal error cannot load AppArmor profile
'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
who can help me fix the error?What may cause the error?
Thanks.
--
???: http://www.xuanmingyi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://listman.redhat.com/archives/libvirt-users/attachments/20121030/00201dd0/attachment.htm>
张章
2012-Oct-30 07:10 UTC
[libvirt-users] Can VMs on different machines communicate with each other without IP?
Dear all,
I confront a somehow strange situation:
I have two machines configured with ip 10.128.80.65 and 10.128.80.66
respectively. Each has several VMs running on it. The problem is that I have no
more ip ( such as 10.128.80.67...) to allocate to VMs, but VMs need to
communicate with each other even when they are on different machines.
Two network options exist: NAT and bridge.
1) NAT
But VMs on different machine cannot communicate with each other.
2)bridge
But there is no more ip for vm to be bridged to host machine.
Is there any other way to work around this problem?
many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://listman.redhat.com/archives/libvirt-users/attachments/20121030/7686548e/attachment.htm>
perhaps you should check the apparmor defines in your xml file 2012/10/30 ??? <xuanmingyi at gmail.com>> I use the code below: > > import libvirt > auth > [[libvirt.VIR_CRED_AUTHNAME,libvirt.VIR_CRED_NOECHOPROMPT],'root',None] > conn = libvirt.openAuth("qemu:///system",auth,0) > with open("/root/cflinux.xml") as f: > xml=f.read() > domain = conn.defineXML(xml) > domain.createWithFlags(0) > > > and report the error: > > libvir: Security Labeling error : internal error cannot load AppArmor > profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee' > Traceback (most recent call last): > File "a.py", line 7, in <module> > domain.createWithFlags(0) > File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in > createWithFlags > if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', > dom=self) > libvirt.libvirtError: internal error cannot load AppArmor profile > 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee' > > > who can help me fix the error?What may cause the error? > > Thanks. > > -- > ???: http://www.xuanmingyi.com > > > _______________________________________________ > libvirt-users mailing list > libvirt-users at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121101/f8837c00/attachment.htm>