--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Cannot assign static IP on a vagrant libvirt debian/stretch64 9.5.0 box
- From: Víctor Cuadrado Juan <me@viccuad.me>
- Date: Sat, 01 Sep 2018 11:20:10 +0200
- Message-id: <153579361043.3189.18122103813305115455.reportbug@clotho>
Package: cloud.debian.org
Severity: normal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hello,
On a vagrant libvirt image debian/stretch64 9.5.0, it isn't possible
to assign static IPs with the vagrant-libvirt plugin. This was possible
before.
To reproduce, install vagrant-libvirt package, and try with:
```
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.provider "libvirt"
config.vm.network "private_network", ip: "192.168.50.3"
config.vm.hostname = "test"
end
```
- From comments in https://github.com/vagrant-libvirt/vagrant-libvirt/issues/867,
it seems that it is because debian/stretch64 uses systemd-networkd instead of
the usual /etc/network/interfaces.
Cheers,
- -- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.17.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEELLKv6mdE0z94m2FAIj8VylqvDngFAluKWcYACgkQIj8Vylqv
DngjRwgAxlMHIpMB5ItsggGs/kUS7eFMBnrC1dsY9GInri4kZE/s776oIJIoplE6
YDyGCSfTOyqAbp/DvibB+caVfp6v141qG+A+7+innJLLynMtJWtpCehbvfNd+rzb
WyL5dcvGJ/kTu8hV6b9sWPYX2q69aZCdp7xHvbLNi9LciyXXHaHue2DbBGBS+m6I
nmojdkLZCli3724FpFBl6sOPly39gouLNyrbP4SHukTMVjD0ERlhrMwRUAqEyiYG
fPqC6OQwLFW2vrQ1jHYl6HsGLpA62OJSfwhL7U6xb4h8rP/TQ5JnnBX/fWmmTIll
qulRXe+Bq22298hPRICzzd9tCrCCzg==
=fJUf
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hi Victor
We switched in the last round of boxes back to ifupdown and assigning
static IP adress to a private network is working now.
Adding the snippet you posted to my Vagrantfile I get
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:9f:c2:e2 brd ff:ff:ff:ff:ff:ff
altname enp0s6
altname ens6
inet 192.168.50.3/24 brd 192.168.50.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe9f:c2e2/64 scope link
valid_lft forever preferred_lft forever
thanks for your interest for the Vagrant boxes, closing now the bug report
Emmanuel
--- End Message ---