Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Vagrant

6,402 views

Published on

Install Ubuntu VM in VirtualBox using vagrant

Published in: Software
  • Sex in your area is here: ♥♥♥ http://bit.ly/2u6xbL5 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/2u6xbL5 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Vagrant

  1. 1. Vagrant Virtualbox provider guide
  2. 2. Install Prerequisites apt-get -y install virtualbox virtualbox-dkms vagrant VM image vagrant box add trusty64 https://oss- binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64- vbox.box
  3. 3. Operate Start image vagrant init && vagrant up Connect vagrant ssh Suspend or shutdown vagrant suspend && vagrant halt
  4. 4. Provisioning Create bootstrap.sh with all the configuration Modify Vagrantfile config.vm.provision :shell, path: "bootstrap.sh" Provision vagrant provision
  5. 5. Bootstrap as a regular user By default script is run as root, to run as a different user do the following. case $(id -u) in 0) # doing root tasks sudo -u vagrant -i $0 ;; *) # doing user tasks ;; esac
  6. 6. Configure CPU and RAM Modify Vagrantfile config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--memory", "1024"] vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"] vb.customize ["modifyvm", :id, "--ioapic", "on"] vb.customize ["modifyvm", :id, "--cpus", "4"] end
  7. 7. Configure network Modify Vagrantfile config.vm.network "public_network", bridge: "br-1", ip: "192.168.56.2" config.vm.network "public_network", bridge: "br-2", ip: "192.168.57.2" config.vm.network "public_network", bridge: "br-3", ip: "192.168.58.2"
  8. 8. Copy files to VM Vagrant.configure("2") do |config| # ... other configuration config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" end
  9. 9. GUI config.vm.provider "virtualbox" do |vb| vb.gui = true end
  10. 10. References Vagrant virtualbox configuration How to make Vagrant performance not suck
  11. 11. My blog Learning Network Programming

×