Search code examples
cloudkvmlibvirtcloud-initfedora-29

cloud-init: Unable to render networking


I'm trying to deploy a 'Fedora-AtomicHost-29-20190219' image (qcow2) using 'NoCloud' to provide userdata, hostname and network settings (non dhcp). Configuring Userdata and hostname succeeds configuring network fails.

The log tells my provided data is read correctly by cloud-init but there seems to be no renderer available on the system:

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']

The installed version of cloud-init on this image is 17.1. NetworkManager is running on machine, systemd-networkd is also installed, but disabled by systemd.

The provided configuration works on ubuntu-18.10 images.

Has someone a idea what I'm doing wrong?

Many thanks.


Solution

  • I used to setup network stuff in meta-data file, and the rest in user-data.

    file: meta-data

    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
    

    file: user-data

    #cloud-config
    ssh_pwauth: True
    ...