Last updated on 2019-04-06
Installing Vagrant on Debian Buster
Should be no harder than:
This worked just fine for me on Debian Buster; however, if you’re using a more stable distribution, it may be prudent to heed their warning:
Beware of system package managers! Some operating system distributions include a vagrant package in their upstream package repos. Please do not install Vagrant in this manner. Typically these packages are missing dependencies or include very outdated versions of Vagrant. If you install via your system’s package manager, it is very likely that you will experience issues. Please use the official installers on the downloads page.
Their downloads page can be found at https://www.vagrantup.com/downloads.html.
To install a
Initializing a Vagrant project
vagrant init debian/buster64 will create a configuration file named
Vagrantfile that is pre-configured to use the
Open that file in your favorite editor and take a look at some of the comments. You can learn more about
Vagrantfile at https://www.vagrantup.com/docs/vagrantfile/.
Did you notice I named the project
attack-vm? Here’s why:
Choosing a “box” and
In Vagrant terms, a “box” is simply a pre-packaged VM in Open Virtualization Format (OVF) that has been uploaded to Vagrant’s servers and can be used as a base image for personalizing your own copy of that VM.
Note the following section on your
Make sure the active directory is still
attack-vm, then issue the command
vagrant up will automatically:
- Download the
debian/buster64VM to ~/.vagrant.d/boxes/
- Create a new VirtualBox VM using the downloaded VM
- New VirtualBox VMs by default are stored at ~/Virtualbox VMs/
- Start the VM in headless mode using VirtualBox
Subsequent invocations of
vagrant up will of course skip the download unless you’ve deleted the box.
vagrant ssh and other useful commands
vagrant up has done its job, you can issue
vagrant ssh to automatically open an SSH session to your VM. Vagrant takes care of generating keys and logging you in automatically.
Other useful commands:
vagrant --help, as you’ve probably done by now.
vagrant <command> --help, to get help for a specific command; e.g.,
vagrant box --help.
vagrant box listshows you all downloaded boxes.
vagrant haltgracefully shuts down the VM; use
vagrant upto start it back up.
vagrant suspendsaves the VM state; use
vagrant resumeto reactivate it.
vagrant reloadrestarts the VM and re-applies everything configured in