当前位置: 首页 > article >正文

ubuntu 22.04 mini 安装,在配置网络时重启后配置文件被重置原因与解决方法

在 /etc/netplan/50-cloud-init.yaml 配置文件中有一段注释中有说明

root@localhost:/etc/netplan# cat 50-cloud-init.yaml
# 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}

翻译过来就是:

修改50-cloud-init.yaml文件在重启后不会生效,除非在 /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg 配置 network: {config: disabled}.

root@localhost:/etc/netplan# cat  /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}

在99-disable-network-config.cfg配置文件中添加 network: {config: disabled} 参数后重启服务器网络配置文件也会生效。
99-disable-network-config.cfg 文件不存在时需要创建


http://www.kler.cn/a/421695.html

相关文章:

  • 基于Java Springboot在线招聘APP且微信小程序
  • sscanf与sprintf函数
  • 帮我写一篇关于AI搜索网页上编写的文章是否存在版权问题的文章, 字数在 3000 字左右。腾讯元宝提问, 记录后用.
  • 字节青训Marscode——8:找出整形数组中超过一半的数
  • el-upload上传多个文件,一次请求,Django接收
  • jupyter-lab 环境构建
  • 探索非传统排序算法:从睡眠排序到量子博戈排序的趣味实现
  • MySql:理解数据库
  • web三、 window对象,延时器,定时器,时间戳,location对象(地址),本地存储-localStorage,数组去重new Set
  • 12.2深度学习_项目实战
  • 【k8s】创建基于sa的token的kubeconfig
  • 【HarmonyOS】鸿蒙应用地理位置获取,地理名称获取
  • Delphi 12.2.1 idhttpserver的使用方法
  • RK3568 + OpenCV 会碰撞出什么火花?案例详解:2-1 基于OpenCV的画线实验
  • Java 基于Spring AI RAG组件做AI智能问答_rag检索增强_AI智能问答
  • 03-13、SpringCloud Alibaba第十三章,升级篇,服务降级、熔断和限流Sentinel
  • Git相关记录
  • 前端跳转路由的时候,清掉缓存
  • Spark常问面试题---项目总结
  • Java基础——(二)Java基本程序结构设计