# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
renderer: networkd
ethernets:
eth0:
match:
macaddress: 06:bf:0c:4a:a5:d6
set-name: eth0
bridges:
br0:
dhcp4: true
macaddress: 06:bf:0c:4a:a5:d6
interfaces:
- eth0
尝试这个。在文件的两个位置设置以太网卡的相同 MAC 地址。如果需要,调整 eth0。
注意:您可能需要创建
/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo netplan --debug generate
sudo netplan apply
reboot
# 强制的请参阅https://cloudinit.readthedocs.io/en/latest/topics/faq.html