I have tried various cloud-init configurations, putting things in user-data, network-data. the following network-data section seems to set the ip but NOT the dns name I am NOT using dhcpd, just manual network config and my macvlan doesn’t have dhcp server on the network, I have to set ipv4 manually, and slaac for ipv6.
name: dnsfixed
description: fixedns
devices:
eth-0:
network: macvlan
type: nic
root:
path: /
pool: default
size: 20GiB
type: disk
config:
cloud-init.network-config: |+
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.0/24
gateway4: 192.168.1.10
nameservers:
addresses:
- 192.168.1.1
project: default
I also tried adding the following to MANUALLY create the resolv.conf:
#cloud-config
write_files:
- path: /etc/resolc.conf
content: |
2606:4700:4700::1001
owner: 'root:root'
permissions: '0644'
I am using the alpine linux 3.22 cloudinit image, but nothing seems (other than the base networking stuff) seems to work. I put these in the relevant user, network etc. Any ideas?