Getting vagrant machine up:

Vagrant can quickly deploy the development environment. Get the vagrant images from here.
Check vagrant status:

vagrant status

List vagrant boxes:

vagrant box list

Add new boxes by doing this command:

$ vagrant box add precise32 http://files.vagrantup.com/precise32.box

Ubuntu i396 (32 bit version) - as of April-2016

$ vagrant box add ubuntu/trusty32 http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box
vagrant box add ubuntu/trusty64 http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
vagrant box add ubuntu/bionic64 http://cloud-images.ubuntu.com/vagrant/bionic/current/bionic-server-cloudimg-amd64-vagrant.box
vagrant box add ubuntu/xenial64 https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-i386-vagrant.box
vagrant package --base my-virtual-machine

- use this to create a box

vagrant box add base http://files.vagrantup.com/lucid32.box

- use this to set your base box to something else

Create a root directory for your Project. Then create a vagrant file in this folder by calling 'vagrant init', which will be the central file for the project configuration.

$ mkdir vagrant_project
$ cd vagrant_project
$ vagrant init


vagrant init

Init Laravel machine

vagrant init laravel/homestead

another example:

vagrant init ubuntu/trusty64; vagrant up --provider virtualbox

Start Environment:

vagrant up

Connect using SSH:

vagrant ssh

stop VM

vagrant halt

suspend VM

vagrant suspend

reload (restart) VM

vagrant reload

load file into vagrant

vagrant upload file.txt
  • web_development/devops/vagrant.txt
  • Last modified: 2020/09/18 03:04
  • by jimboobrien