How to autostart multiple OS instances on Vagrant ?

Do you want to know how to autostart multiple OS instances on Vagrant ? Here is a quick and working solution to that problem.

Let’s autostart multiple instances of your OS on Vagrant. I am going to use here Centos 7 instance.

    1. What toy have to do first is to edit Vagrantfile in your code editor.
    2. Find line like config.vm.box = “centos7” [in my file it is on line 15]
    3. To autorun 2 instances , add this code below:
      config.vm.define "test1" do |test1| 
          test1.vm.hostname = "test1"
          test1.vm.network "private_network", ip: "10.9.8.5"
        end
      
        config.vm.define "test2" do |test2|
          test2.vm.hostname = "test2"
          test2.vm.network "private_network", ip: "10.9.8.6"
        end
      

 

Leave a Reply