
惯性思维: VM 中,虚拟机的网络可以选择桥接模式,可以通过宿主机的网卡自动分配一个与宿主机网络同网段的 IP 地址,此时相当于一个网卡下面有两个独立的设备,一个宿主机一个虚拟机,路由器中也能看到。 在 PVE 中: 1 )我用的是无线网卡,配置自动生成的 vmbr0 才能连通 PVE 管理页面
auto wlp3s0 iface wlp3s0 inet static wpa-ssid "...." wpa-psk ... address 192.168.0.124/24 gateway 192.168.0.1 auto vmbr0 iface vmbr0 inet static address 203.12.1.3/24 bridge-ports none bridge-stp off bridge-fd 0 如果我改成
auto wlp3s0 iface wlp3s0 inet dhcp wpa-ssid "..." wpa-psk ... auto vmbr0 iface vmbr0 inet static address 192.168.0.124/24 gateway 192.168.0.1 bridge-ports wlp3s0 bridge-stp off bridge-fd 0 这样就联不通 PVE 了。vmbr0 和管理页面是啥关系?
2 )其实最终的目的是为了虚拟机选择 vmbr0 网口时,能生成一个基于路由器网段的 IP ,这样我就能用路由器的端口转发到这台虚拟机上了
1 ho121 Feb 20, 2023 不太懂 PVE ,不过 libvirt 桥接到 wlan 是不支持的 Important Note: Unfortunately, wireless interfaces cannot be attached to a Linux host bridge, so if your connection to the external network is via a wireless interface ("wlanX"), you will not be able to use this mode of networking for your guests. https://wiki.libvirt.org/page/Networking |
2 kaedeair Feb 20, 2023 vmbr0 是 pve 的管理页面接口,和路由器的 br-lan 差不多 |