Thursday, September 1, 2016

Installing Ubuntu 14.04 (Command line only) with Vagrant and VirtualBox on Windows 10

1. Install Oracle VM VirtualBox
2. Install Vagrant
3. Configure Vagrant

C:\NagArvind> vagrant box add ubuntu/trusty64 https://atlas.hashicorp.com/ubuntu/trusty64
C:\NagArvind> vagrant init ubuntu/trusty64; vagrant up --provider virtualbox

    --- if above doesn't work ---

C:\NagArvind> vagrant init

Edit the Vagrantfile in this directory and replace
    config.vm.box = "ubuntu/trusty64"

C:\NagArvind> vagrant up

4. Connect to the VM using PuTTY
    Hostname: 127.0.0.1
    Port: 2222
    Username: vagrant
    Password: vagrant

C:\NagArvind> vagrant halt

Vagrant Commands (In detail):
C:\NagArvind> vagrant box add ubuntu/trusty64 https://atlas.hashicorp.com/ubuntu/trusty64  //Downloads VM from https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/XXX.X.X/providers/virtualbox.box
C:\NagArvind> vagrant box add ubuntu/trusty64 --insecure  // For SSL issues
C:\NagArvind> vagrant box remove ubuntu/trusty64  // Only incase the download gets corrupt
C:\NagArvind> vagrant init ubuntu/trusty64  -> Replaces the already downloaded Vagrantfile
C:\NagArvind> vagrant up --provider virtualbox
C:\NagArvind> vagrant halt
C:\NagArvind> vagrant destroy  // End of the Project

5. All-In-One Virtual Machine for OpenShift Origin:
https://www.openshift.org/vm/