Cloning of Vagrant box

Cloning of Vagrant box

1.       Stop existing vagrant

a.       Vagrant halt

2.       Take the backup of box and it creates package.box file

a.       Vagrant package



3.        Copy this file to separate location

4.       Rename this file(like vm2.box)

5.       Open the command prompt on this location and execute the below command to generate Vagrantfile

a.       Vagrant init

6.       Add the following lines

                                                               i.        config.vm.box = "vm2"  # this shoud be unique

                                                             ii.        config.vm.box_url = file:///E:/VagrantBox/vm2.box #location of the .box file



7.       Stat the vagrant box

a.       Vagrant up



 

8.       Connect the vagrant server

a.       Vagrant ssh


Comments

Popular Posts