我正在尝试禁用云初始化网络配置。在cloud init doc中,我必须在内核命令行条目中设置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字符串。
我是否在正确的位置配置?
由于
答案 0 :(得分:0)
在/etc/cloud/cloud.cfg.d/99-custom-networking.cfg
创建一个包含以下内容的文件:
network: {config: disabled}