如何在虚拟机启动时阻止 Cloud-Init 中的网络设置

要禁用 Cloud-Init 中的网络配置,您需要创建一个文件 /etc/cloud/cloud.cfg.d/99-custom-networking.cfg,并添加内容 network: {config: disabled}

为此,您可以执行以下命令

$ sudo echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
评分: 1 Star2 Stars3 Stars4 Stars5 Stars (32 次评分,平均 4.81)
Loading...