I would like to boot an Arch Linux instance using LXC. Just about everything works, but I'm encountering the following error when trying to configure an interface using dhcpcd
:
# dhcpcd eth0
dhcpcd[4213]: version 5.6.4 starting
dhcpcd[4213]: eth0: if_init: Read-only file system
dhcpcd[4213]: eth0: interface not found or invalid
This appears to be a direct result of dhcpcd
trying to modify /proc/sys/net/ipv4/conf/eth0/promote_secondaries
:
4210 open("/proc/sys/net/ipv4/conf/eth0/promote_secondaries", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EROFS (Read-only file system)
4210 writev(2, [{"dhcpcd[4210]: eth0: if_init: Read-only file system", 50}, {"\n", 1}], 2) = 51
I can hack around it using a bind
mount:
# touch /tmp/promote_secondaries
# mount -o bind /tmp/promote_secondaries \
/proc/sys/net/ipv4/conf/eth0/promote_secondaries
But that seems like a terrible idea. Is there any way to get dhcpcd
to run under LXC without this hack? Why is write access to this sysctl not available under LXC?