2

我正在尝试使用“NoCloud”部署“Fedora-AtomicHost-29-20190219”映像(qcow2)以提供用户数据、主机名和网络设置(非 dhcp)。配置用户数据和主机名成功配置网络失败。

日志告诉 cloud-init 正确读取了我提供的数据,但系统上似乎没有可用的渲染器:

2019-02-26 11:33:44,805 - stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 2, 'ethernets': {'net1': {'match': {'macaddress': '52:54:00:ab:cd:ef'}, 'dhcp4': False, 'dhcp6': False, 'addresses': ['192.168.42.100/24', '2001:db8::100/32'], 'gateway4': '192.168.42.1', 'gateway6': '2001:db8::1', 'nameservers': {'search': ['example.com'], 'addresses': ['192.168.42.53', '1.1.1.1']}}, 'net0': {'match': {'macaddress': '52:54:00:59:e0:78'}, 'dhcp4': False, 'dhcp6': False, 'addresses': ['10.170.64.95/24'], 'routes': [{'to': '10.170.0.0/16', 'via': '10.170.64.1'}, {'to': '10.270.0.0/16', 'via': '10.170.64.1', 'metric': 100}]}}}
2019-02-26 11:33:44,806 - stages.py[ERROR]: Unable to render networking. Network config is likely broken: No available network renderers found. Searched through list: ['eni', 'sysconfig', 'netplan']

此映像上安装的 cloud-init 版本为 17.1。NetworkManager 在机器上运行,还安装了 systemd-networkd,但被 systemd 禁用。

提供的配置适用于 ubuntu-18.10 映像。

有人知道我做错了什么吗?

非常感谢。

4

1 回答 1

0

我曾经在元数据文件中设置网络内容,其余的在用户数据中。

文件:元数据

instance-id: demo01
local-hostname: demo01
network-interfaces: |
  iface eth0 inet static
  address 192.168.56.106
  network 192.168.56.0
  netmask 255.255.255.0
  broadcast 192.168.56.255
  gateway 192.168.56.254

文件:用户数据

#cloud-config
ssh_pwauth: True
...
于 2019-02-26T16:54:32.860 回答