【问题标题】:Unable to create tap device vnet d: Operation not permitted无法创建 Tap 设备 vnet d:不允许操作
【发布时间】:2014-10-09 22:28:46
【问题描述】:

我正在尝试将桥接网络添加到 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

【问题讨论】:

    标签: qemu kvm libvirt centos6.5


    【解决方案1】:

    从错误消息中,我看到您正在以连接到 qemu:///session 的非特权用户身份运行 virt-install。使用非特权 libvirtd 实例,您可以使用的网络模式非常有限,部分原因是“网络”模式不可用,因为您的用户没有权限管理 TAP 设备。

    替代方法是使用特权 libvirtd 实例 (qemu:///system) 来运行 VM,从而为其提供完整的网络访问权限,或者启用 QEMU setuid 网络帮助程序。这允许您在运行非特权时使用 --network bridge=NAME 进行 virt-install,将 TAP 设备设置委托给 setuid 帮助程序

    【讨论】:

      猜你喜欢
      • 2015-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-27
      • 2016-09-21
      相关资源
      最近更新 更多