Vagrant quickly creates a new virtual machine. Settings like automated ssh login and sudo are handled automatically.
To follow this artice, you should be familiar with command line, apt-get and ssh.
First Time Setup
$ sudo apt-get -y install vagrant
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
Takes 5-10 minutes to download the image.
Creating a New Virtual Machine & SSH Login
$ vagrant init lucid32
$ vagrant up
$ vagrant ssh
Vagrant greeted me with Ubuntu 10.04 login screen on the guest operating system. Vagrant automatically sets up openssh-server, ssh pubkey login and sudo without password (on the guest OS). For example, I could immediately use ‘sudo apt-get update; sudo apt-get install trash-cli’.
What’s Next?
Set web development environment on Vagrant – stay tuned for a new article.
Troubleshooting
“A Vagrant environment is required to run this command. Run `vagrant init` to set one up.” You should run ‘vagrant ssh’ in the folder where your Vagrantfile is. Change folder show that ‘ls’ shows Vagrantfile, then run ‘vagrant ssh’ again.
Update 2013-03-28: I want to use Ubuntu 12.04 LTS. Answer:
$ vagrant box add precise32 http://files.vagrantup.com/precise32.box $ vagrant init precise32 $ vagrant up $ vagrant ssh
See also
Hashimoto and Bender 2012: Getting Started with Vagrant
Admnistrivia
Tested on xUbuntu 12.04 precise beta 32bit, Linux 3.2.0-18-generic-pae, vagrant 0.9.5-1, virtualbox 4.1.8-dfsg-2.
Briefly in Finnish: Asenna valmiiksi säädettyjä virtuaalikoneita Vagrantilla.













BotBook.com
Sulautetut.fi