Vagrant
C:\Users\njohi>vagrant box list
C:\Users\njohi\vagrant>mkdir project1
C:\Users\njohi\vagrant>cd project1
C:\Users\njohi\vagrant\project1>ls -ltr
'ls' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\njohi\vagrant\project1>dir
Volume in drive C is
OS
Volume Serial Number
is F21F-70F2
Directory of
C:\Users\njohi\vagrant\project1
08/14/2018 10:09
AM <DIR> .
08/14/2018 10:09
AM <DIR> ..
0
File(s) 0 bytes
2
Dir(s) 270,020,452,352 bytes free
C:\Users\njohi\vagrant\project1>vagrant init centos/7
A `Vagrantfile` has been placed in this directory. You are
now
ready to `vagrant up` your first virtual environment! Please
read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
C:\Users\njohi\vagrant\project1>dir
Volume in drive C is
OS
Volume Serial Number
is F21F-70F2
Directory of
C:\Users\njohi\vagrant\project1
08/14/2018 10:11
AM <DIR> .
08/14/2018 10:11
AM <DIR> ..
08/14/2018 10:11
AM 3,085 Vagrantfile
1
File(s) 3,085 bytes
2
Dir(s) 269,974,601,728 bytes free
C:\Users\njohi\vagrant\project1>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found.
Attempting to find and install...
default: Box
Provider: virtualbox
default: Box
Version: >= 0
==> default: Loading metadata for box 'centos/7'
default: URL:
https://vagrantcloud.com/centos/7
==> default: Adding box 'centos/7' (v1804.02) for
provider: virtualbox
default:
Downloading:
https://vagrantcloud.com/centos/boxes/7/versions/1804.02/providers/virtualbox.box
default: Download
redirected to host: cloud.centos.org
default:
==> default: Successfully added box 'centos/7' (v1804.02)
for 'virtualbox'!
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM:
project1_default_1534267088297_30073
==> default: Clearing any previously set network
interfaces...
==> default: Preparing network interfaces based on
configuration...
default: Adapter
1: nat
==> default: Forwarding ports...
default: 22
(guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a
few minutes...
default: SSH
address: 127.0.0.1:2222
default: SSH
username: vagrant
default: SSH auth
method: private key
default:
default: Vagrant
insecure key detected. Vagrant will automatically replace
default: this with
a newly generated keypair for better security.
default:
default: Inserting
generated public key within guest...
default: Removing
insecure key from the guest if it's present...
default: Key
inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest
additions were detected on the base box for this VM! Guest
default: additions
are required for forwarded ports, shared folders, host only
default:
networking, and more. If SSH fails on this machine, please install
default: the guest
additions and repackage the box to continue.
default:
default: This is
not an error message; everything may continue to work properly,
default: in which
case you may ignore this message.
==> default: Rsyncing folder:
/cygdrive/c/Users/njohi/vagrant/project1/ => /vagrant
C:\Users\njohi\vagrant\project1>vagrant ssh
Last login: Tue Aug 14 17:24:42 2018
[vagrant@localhost ~]$ sudo su -
Last failed login: Tue Aug 14 17:21:52 UTC 2018 on tty1
There was 1 failed login attempt since the last successful
login.
[root@localhost ~]# exit
logout
[vagrant@localhost ~]$ exit
logout
Connection to 127.0.0.1 closed.