Dear all,

I set up a arch linux container on my arch box.
The container (dahlia) boots, works and connect fine.

Now I want to set up a static IP on the container, and I must admit I am
loosing my mind.

The overall set up :
on host :
dhcpcd@enp7s0.service - dhcpcd on enp7s0
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)
   Active: active (running) since Sun 2014-02-23 14:44:07 CET; 53min ago
  Process: 382 ExecStart=/usr/bin/dhcpcd -q -w %I (code=exited,
status=0/SUCCESS)
 Main PID: 515 (dhcpcd)
   CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@enp7s0.service
           └─515 /usr/bin/dhcpcd -q -w enp7s0

$ ip addr
.......
 inet 192.168.1.87/24 brd 192.168.1.255 scope global enp7s0

--> Shall I use a bridge on host ?

On guest :

I disabled dhcpcd@.service, then
I was thinking using this profile (named dahliaVM) with netctl :

Description='A basic static ethernet connection'
Interface=enp7s0
Connection=ethernet
IP=static
Address=('192.168.1.23/24' '192.168.1.87/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.254'
DNS=('212.147.10.180' '212.147.10.162')

the etc/systemd/system/netctl@dahliaVM.service is here with inside:

[Unit]
Description=A basic static ethernet connection
BindsTo=sys-subsystem-net-devices-enp7s0.device
After=sys-subsystem-net-devices-enp7s0.device

Unfortunately this setup do not work.

gab@dahlia ➤➤ ~ % systemctl status netctl@dahliaVM.service
netctl@dahliaVM.service - A basic static ethernet connection
   Loaded: loaded (/etc/systemd/system/netctl@dahliaVM.service; static)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

Feb 23 14:46:51 dahlia systemd[1]: Dependency failed for A basic static
ethernet connection.
Feb 23 15:23:13 dahlia systemd[1]: Dependency failed for A basic static
ethernet connection.
Feb 23 15:26:28 dahlia systemd[1]: Dependency failed for A basic static
ethernet connection.

I was thinking too using the new systemd-network facility, but it is too
new for me, and if the host is running systemd-git, the container is with
systemd 208.

I would appreciate some help to set up a static Ip on the container
different from the host IP.

Thank you
.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to