Virtual Box and Vagrant needs to be installed and configured first!
I am gonna be using the Ubuntu base image “Ubuntu 18.04, Bionic Beaver”
Create a new folder were you can store your OS image and Vagrant file.
Download the iso
Create a new vm
Disable audio and USB.
Set network to NAT and add port forwarding for SSH.
Select your iso image.
Start the vm and confirm the default settings during the installation.
user = vagrant
pw = vagrant
Use entire disk
Install automatic updates
Don’t forget to remove the iso, after finishing the installation.
Now you should be able to log in with user vagrant
Although vagrant is a superuser you don’t want to type sudo < command > all the time.
To prevent that:
Adding insecure Keypair from https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
and add to the end of the file
Restart the ssh service
service ssh restart
Install the following additional packages
apt-get install -y gcc build-essential git linux-headers-$(uname -r) dkms
Install Virtual Box Guest Additions
Insert Guest Additions CD image from Devices menu
Zero out the disk to fix fragmentation issues and to compress the disk easier
Create your box
You now should be able to access your box via ssh