Hi All,
Is there any way I can change the config name of VM....where one do vagrant ssh <VM_Name>?
I can change the hostname & VM name (displayed on VBOX) by editing and doing "vagrant reload". But if I do try to change name in config.vm.define, it just try to recreate the VM.
Here is vagrant file -
(1..NodeCount).each do |i|
config.vm.define "ubuntuvm0#{i}" do |node|
node.vm.box = "ubuntu/bionic64"
node.vm.hostname = "ubu18-#{i}"
node.vm.network "private_network", ip: "10.0.0.10#{i}"
node.vm.provider "virtualbox" do |v|
v.name = "ubu18-#{i}"
v.memory = 1024
v.cpus = 1
If I change it to something like ubu18-#{i}, reload fails and up just try to create new VM.
makrand@mint-gl63:~/lab/vagrant/vagrantfiles/ubuntu18$ vagrant reload
==> ubu18-1: VM not created. Moving on...
==> ubu18-2: VM not created. Moving on...
==> ubu18-3: VM not created. Moving on...
makrand@mint-gl63:~/lab/vagrant/vagrantfiles/ubuntu18$ vi Vagrantfile
makrand@mint-gl63:~/lab/vagrant/vagrantfiles/ubuntu18$ vagrant up
Bringing machine 'ubu18-1' up with 'virtualbox' provider...
Bringing machine 'ubu18-2' up with 'virtualbox' provider...
Bringing machine 'ubu18-3' up with 'virtualbox' provider...
==> ubu18-1: Importing base box 'ubuntu/bionic64'...
Progress: 90%^C==> ubu18-1: Waiting for cleanup before exiting