OpenNebula - 桥接 VM NIC 与主机 NIC - 从 LAN DHCP 获取 IP

OpenNebula - Bridge VM NIC with Host NIC - take Ip from LAN DCHP

希望你一切顺利, 我在这里开始使用 OpenNebula,我在 centos 8 中部署了一个 Opennebula 前端的基本设置 另一台服务器作为 OpenNebula 节点, 我从市场下载一个图像,它是 centos 图像,然后我在网络 >> 虚拟网络下创建一个网络。将它与 ens33 桥接(ens3 是我节点的物理接口),以便让 VM 访问 LAN, 他是我的节点网

[centos@host1 ~]$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.60  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 00:0c:29:68:26:2b  txqueuelen 1000  (Ethernet)
        RX packets 679155  bytes 994474147 (948.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 41914  bytes 3220552 (3.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 6  bytes 672 (672.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 672 (672.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:89:84:b1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

一旦我创建了一个 VM 并将其连接到我已经创建的桥接网络,我得到状态失败并显示以下日志:

Sat May 1 03:50:25 2021 [Z0][VM][I]: New state is ACTIVE
Sat May 1 03:50:25 2021 [Z0][VM][I]: New LCM state is PROLOG
Sat May 1 03:50:38 2021 [Z0][VM][I]: New LCM state is BOOT
Sat May 1 03:50:38 2021 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/14/deployment.0
Sat May 1 03:50:39 2021 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Sat May 1 03:50:40 2021 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vnm/bridge/pre
Sat May 1 03:50:40 2021 [Z0][VMM][E]: pre: Command "sudo ip link add name ens33 type bridge " failed.
Sat May 1 03:50:40 2021 [Z0][VMM][E]: pre: RTNETLINK answers: File exists
Sat May 1 03:50:40 2021 [Z0][VMM][E]: RTNETLINK answers: File exists
Sat May 1 03:50:40 2021 [Z0][VMM][E]:
Sat May 1 03:50:40 2021 [Z0][VMM][I]: ExitCode: 2
Sat May 1 03:50:40 2021 [Z0][VMM][I]: Failed to execute network driver operation: pre.
Sat May 1 03:50:40 2021 [Z0][VMM][E]: Error deploying virtual machine: bridge: RTNETLINK answers: File exists
Sat May 1 03:50:40 2021 [Z0][VM][I]: New LCM state is BOOT_FAILURE

任何人都可以向我解释这里出了什么问题,我熟悉 vsphere esxi/vcenter,我只想创建一个 VMNetwork 并将其附加到节点物理 NIC,然后将 VM 附加到这个 VMNetwork 以便给它 LAN 访问权限,在 VMware 方面它很简单但是使用 OpenNebula 我不确定它是如何工作的

谢谢

这里的问题是您使用的是物理接口而不是网桥。如果您想使用桥接网络,您需要创建一个桥接器或让 OpenNebula 为您创建它。

让我知道这是否解决了您的问题,如果没有,请随时在 OpenNebula 论坛上提交您的查询 - https://forum.opennebula.io/。 :)