Hello,
I want to setup a node with Vagrant/Libvirt with a static ip accessible only from the host. Here my config :
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.configure("2") do |config|
config.vm.box = "debian/stretch64"
config.vm.network "private_network", ip: "10.20.30.40"
config.vm.provider "libvirt" do |v|
v.memory = 4096
v.cpus = 1
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade -y
apt-get install -y net-tools htop apt-transport-https curl iftop
SHELL
end
I am using the vagrant up
and vagrant ssh
. Then if I do sudo ifconfig
, I am getting inet 10.20.30.57
.
I obtain an ip with the correct three first digits, but the last one is randomly chosen. Seems like Vagrant is only considering the ip as a network with 255.255.255.0 mask and acts as dhcp to choose an ip from the network.
What am I doing wrong ?
I am under Ubuntu 16.04 and using Vagrant 2.0.2 and libvirt 1.3.1
Thanks for the help.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c5c965eb-5334-494c-871a-44392eae7a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.