Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Private network disappears after reboot #474

Closed
tjaacks opened this issue Oct 23, 2018 · 3 comments
Closed

Private network disappears after reboot #474

tjaacks opened this issue Oct 23, 2018 · 3 comments
Labels

Comments

@tjaacks
Copy link

tjaacks commented Oct 23, 2018

I have configured a private network in my vagrant LXC container as follows:

config.vm.network "private_network", ip: "192.168.20.100", lxc__bridge_name: 'lxcbr1'

Aftter vagrant up the interface eth1 is correctly brought up. However, when I call sudo reboot from within the vagrant container and call vagrant ssh again, the interface is gone. Only the default interface eth0 is there. Trying to bring it up manually using sudo ifconfig eth1 up fails:

eth1: ERROR while getting interface flags: No such device

I am using Vagrant 2.1.2 with this box:

https://vagrantcloud.com/debian/boxes/stretch64/versions/9.1.0

@tjaacks
Copy link
Author

tjaacks commented Oct 29, 2018

I found out that vagrant configures eth1 AFTER the machine has booted using a vagrant-lxc-wrapper call. When the container is rebooted from inside, this step (of course) is missing. Am I correct, that the only possibility is to reboot the container using vagrant halt && vagrant up?

@ccope
Copy link
Contributor

ccope commented Nov 27, 2018

Yes, vagrant has to manage the container lifecycle in order to apply all of its settings.

@fgrehm fgrehm added the ignored label Nov 17, 2022
@fgrehm
Copy link
Owner

fgrehm commented Nov 17, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #499, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants