我昨天买了一张proxmox牌照。 所有的工作都很好,只有networkingconfiguration非常复杂。 我的networkingconfiguration:
84.200.50.186 -> hostsystem ip 84.200.50.186 -> VM ip 255.255.255.248 -> netmask 84.200.50.185 -> gateway auto eth0 iface eth0 inet static address 84.200.50.186 netmask 255.255.255.248 gateway 84.200.50.185 auto vmbr0 iface vmbr0 inet static address 84.200.50.187 netmask 255.255.255.248 gateway 84.200.50.185 bridge_ports eth0 bridge_stp off bridge_fd 0
该IP能够ping通,但虚拟机没有连接到互联网。
有任何想法吗? 🙁
您的networkingconfiguration错误。 主机只需要自己的IP地址,而且您必须configuration虚拟机的networking,而不是主机。
vmbr0是主机到eth0的桥接,所以eth0没有任何configuration。 主机的IP地址需要在vmbr0接口上设置。 如果您希望将虚拟机桥接,则需要将其桥接到vmbr0。
假设84.200.50.187是虚拟机的IP地址,请按如下方式更改主机的networkingconfiguration:
auto lo iface lo inet loopback iface eth0 inet manual auto vmbr0 iface vmbr0 inet static address 84.200.50.186 netmask 255.255.255.248 bridge_ports eth0 bridge_stp off bridge_fd 0 gateway 84.200.50.185
在虚拟机端,configurationnetworking如下:
它应该工作。