我正在尝试将桥接网络添加到 Centos 6 主机上的来宾 VM。我通过添加一个文件创建了一个桥 br0:
/etc/sysconfig/network-scripts/ifcfg-br0:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
STP=on
ONBOOT=yes
另外,我在 /etc/sysconfig/network-scripts/ifcfg-eth0 中添加了一行:
BRIDGE=br0
现在,我尝试使用以下方法创建 VM:
virt-install -n ubuntu_vm --disk path=kvm-images/ubuntu-12.04.qcow2,size=30,format=qcow2 --ram=2048 --cdrom= --os-type=linux --network bridge=br0 --os-variant=ubuntuprecise --graphics vnc,listen=0.0.0.0
现在,我收到以下错误:
Starting install...
**ERROR Unable to create tap device vnet%d: Operation not permitted**
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///session start ubuntu_new_vm
otherwise, please restart your installation.
我看到这个问题在我目前使用的 libvirt 0.10.2 之前已经修复,但我仍然遇到同样的错误。
http://www.redhat.com/archives/libvir-list/2012-May/msg00678.html