Comments (9)
From Linux guest perspective, ethX
to enpXsY
naming scheme change is due to the move from SysV init to systemd
(systemd-udevd
).
The following distributions have already switched to systemd
- Arch Linux
- Fedora 20
- openSUSE 13.1
- RHEL 7
- CentOS 7
- Oracle Linux 7
- Debian jessie testing (can use systemd as default init system)
Before Vagrant fixes this in its own code, an easy temporary workaround is to pass net.ifnames=0
to kernel boot parameters to revert to the old NIC naming scheme.
That's why I updated the Arch Linux and Oracle Linux 7.0 base box with the information.
from vagrantboxes.
Thanks for clarification :)
from vagrantboxes.
I wanted to set a private_network in my Vagrantfile and vagrant complained that eth1
did not exist.
My goal was to ssh in the vagrant box with putty so I needed an ip (so no vagrant ssh
).
But there's a workaround: by parsing the output of vagrant ssh-config
, you can get the ip address and the port (127.0.0.1 and 2222 for me). So no need for eth1!
from vagrantboxes.
@ibizaman 127.0.0.1
port 2222
was the default Vagrant networking mode. It is set through a port forwarding rule of the first virtual NIC. It is how vagrant ssh
connects to the vagrant box.
Please note private network in Vagrant is different networking mode. Private network is equivalent to Host-only networking in VirtualBox.
from vagrantboxes.
My bad, you are totally right!
I suppose the port changes when there are multiple vagrant boxes active? Parsing vagrant ssh-config
should be useful then, right?
from vagrantboxes.
@ibizaman You are right. I haven't used vagrant ssh-config
to be honest ;-D
When using port forwarding with NAT networking, we can use auto_correct
in Vagrantfile
to auto correct any collisions. Like below.
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 8080,
auto_correct: true
end
In addition, VAGRANT_LOG=info vagrant up
or vagrant up --debug
should also be helpful if things like that happen. Hope it helps.
from vagrantboxes.
@terrywang I'm a bit of a noob in this. How do I set the kernel boot parameters?
from vagrantboxes.
$ sed -i -e "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"net.ifnames=0\"/g" /etc/default/grub
$ grub-mkconfig -o /boot/grub/grub.cfg
from vagrantboxes.
pass
net.ifnames=0
to kernel boot parameters
Another solution is
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
PS
I see a symbolic link from /etc/udev/rules.d/80-net-name-slot.rules
to /dev/null
.
This was the old name for 80-net-setup-link.rules
, and it no longer works, evidently.
According to systemd documentation, the new name is the one I wrote above; I suggest updating the file name.
Anyone curious should see the documentation for all 4 solutions, which include terrywang's.
I hope vagrant figures out systemd soon, so we can forget this.
from vagrantboxes.
Related Issues (20)
- Sudo not working HOT 2
- umask override in ~/.profile for root and vagrant HOT 1
- Missing veewee files for Arch Linux HOT 2
- Remove /etc/gemrc HOT 2
- mv: missing destination file operand after โ/tmp/vagrant_networkโ HOT 2
- Upgrade archlinux box for convenience HOT 3
- [.tmux.conf] send-prefix not bound HOT 1
- OEL 7 does not have puppet installed HOT 3
- /home HOT 7
- Request for enhancement: put these boxes to altas HOT 1
- [Arch] System no longer updates because of issue with ca-certificates-utils HOT 2
- Unable to obtain new ArchLinux image (v201704) from atlas.hashicorp.com HOT 2
- create libvirt box HOT 1
- /etc HOT 1
- /vagrant has no permissions for user vagrant HOT 3
- Archlinux box fails to update due to libxfont and srm HOT 1
- up2date package HOT 2
- Can't ping a fresh instance (v3.18.0621) HOT 1
- [Recommend] use linux-lts kernel for archlinux box HOT 1
- ol5 box not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrantboxes.