My vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-21.04"
config.vm.define "m11" do |m11|
m11.vm.hostname = "firstserver1"
m11.vm.network "private_network", ip: "150.129.148.251"
m11.vm.provider "virtualbox" do |vb|
vb.name = "firstserver1"
end
end
config.vm.define "m21" do |m21|
m21.vm.hostname = "secondserver1"
m21.vm.network "private_network", ip: "150.129.148.252"
m21.vm.provider "virtualbox" do |vb|
vb.name = "secondserver1"
end
end
config.vm.define "m31" do |m31|
m31.vm.hostname = "thirdserver1"
m31.vm.network "private_network", ip: "150.129.148.253"
m31.vm.provider "virtualbox" do |vb|
vb.name = "thirdserver1"
end
end
config.vm.provision "shell" , path:"docker.sh"
end
When I try to vagrant up, initially by mistake I gave same IP to all the three machines.
Later I changed it.
I did then vagrant and vagrant reload.But the IP address is not changing.
vagrant halt
vagrant reload
Any suggestions please on how to fix this?
The /etc/network/interfaces is just an empty file here on the OS installed.