Score:0

ubuntu 21 vagrant file is not changing the IP address with reload, how to fix that?

ng flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.