Running Virtual Machine into a window command prompt
Prerequisite: Install =>
1. Virtual box => https://www.virtualbox.org/wiki/Download_Old_Builds_5_2
2. Vagrant => https://www.vagrantup.com/
A. Open Command prompt and create a folder “vm2”.
Go to folder and type command => vagrant init
Ø This will configure the current directory to be a Vagrant environment by generating an initial Vagrantfile if one does not already exist.
B. Configure your Vagrantfile which is just initialized at your directory vm2.
Write => config.vm.box = “ubuntu/xenial64 [ Cloud-image of the ubuntu ]
OR
You can directly use: “vagrant init ubuntu/xenial64” in first step. Using this we did need to configure the vagrant file.
C. After configuring the file, Create the guest machine using
“Vagrant up”
=> This command creates and configures guest machines according to your Vagrantfile.
D. Let's enter into our machine.
Command: “vagrant ssh”.
This will SSH into a running Vagrant machine and give you access to a shell.