what's the total number of "a"s in:
now that you have initialized your project and configured a box for it to use, it is time to boot your first vagrant environment.
»bring up a virtual machine
run the following from your terminal:
$ vagrant up
in less than a minute, this command will finish and you will have a virtual machine running ubuntu.
»ssh into the machine
you will not actually see anything though, since vagrant runs the virtual machine without a ui. to prove that it is running, you can ssh into the machine:
$ vagrant ssh welcome to ubuntu 18.04.3 lts (gnu/linux 4.15.0-58-generic x86_64) * documentation: https://help.ubuntu.com * management: https://landscape.canonical.com * support: https://ubuntu.com/advantage system information as of tue jun 16 21:57:57 utc 2020 system load: 0.44 processes: 91 usage of /: 2.5% of 61.80gb users logged in: 0 memory usage: 11% ip address for eth0: 10.0.2.15 swap usage: 0% * microk8s gets a native windows installer and command-line integration. https://ubuntu.com/blog/microk8s-installers-windows-and-macos 0 packages can be updated. 0 updates are security updates. vagrant@vagrant:~$
this command will drop you into a full-fledged ssh session. go ahead and
interact with the machine and do whatever you want. although it may be tempting,
be careful about
rm -rf /, since vagrant shares a directory at
/vagrant
with the directory on the host containing your vagrantfile, and this can
delete all those files. shared folders will be covered in the next section.
take a moment to think what just happened: with just one line of configuration and one command in your terminal, we brought up a fully functional, ssh accessible virtual machine. cool.
terminate the ssh session with
ctrl+d, or by logging out.
vagrant@vagrant:~$ logout connection to 127.0.0.1 closed.
»destroy the machine
once you're back on your host machine, stop the machine that vagrant is managing and remove all the resources created during the machine-creation process. when prompted, confirm with a
yes.
$ vagrant destroy default: are you sure you want to destroy the 'default' vm? [y/n] y ==> default: forcing shutdown of vm... ==> default: destroying vm and associated drives...
»remove the box
the
vagrant destroy command does not remove the downloaded box
file. list your box files.
$ vagrant box list hashicorp/bionic64 (virtualbox, 1.0.282)
remove the box file with the
remove subcommand, providing the name of your box.
$ vagrant box remove hashicorp/bionic64 removing box 'hashicorp/bionic64' (v1.0.282) with provider 'virtualbox'...
you have successfully created and interacted with your first vagrant environment! continue to the next tutorial to sync files between your local computer and the guest virtual machine.
user
The text includes one hundred and seventy-one "a"s in total.
assistant