【问题标题】:How to disable cloud init networking?如何禁用云初始化网络?
【发布时间】:2018-08-21 07:23:40
【问题描述】:

我正在尝试禁用云初始化网络配置。从云初始化文档中,我必须在内核命令行条目中设置network-config={config: disabled}

当我在/etc/default/grub中设置时:

GRUB_CMDLINE_LINUX="network-config={config: disabled}"

并运行update-grub,但它给了我以下错误:

generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found initrd image: /boot/initrd.img-4.4.0-116-generic
Found linux image: /boot/vmlinuz-4.4.0-104-generic
Found initrd image: /boot/initrd.img-4.4.0-104-generic
Found linux image: /boot/vmlinuz-4.4.0-97-generic
Found initrd image: /boot/initrd.img-4.4.0-97-generic
error: syntax error.
error: Incorrect command.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 128
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done

看起来它不需要 yaml 字符串。

我是否在正确的位置进行配置?

谢谢

【问题讨论】:

    标签: cloud cloud-init


    【解决方案1】:

    /etc/cloud/cloud.cfg.d/99-custom-networking.cfg 创建一个文件,其中包含:

    network: {config: disabled}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-07
      • 2016-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多