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.



Published on

Install Ubuntu VM in VirtualBox using vagrant

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


  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-
  3. 3. Operate Start image vagrant init && vagrant up Connect vagrant ssh Suspend or shutdown vagrant suspend && vagrant halt
  4. 4. Provisioning Create with all the configuration Modify Vagrantfile config.vm.provision :shell, path: "" 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 "public_network", bridge: "br-1", ip: "" "public_network", bridge: "br-2", ip: "" "public_network", bridge: "br-3", ip: ""
  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