Virtual Machines and Related Software¶
In Getting Started: As a User, we created a virtual machine based on the Full Virtual Micromagnetics environment using a virtual machine provider and manager. Here, we detail some of the underlying mechanisms of virtual machine creation, what providers, managers, and provisioners are, and how virtual machines and virtual environments are related through these virtual machine software.
A virtual machine is a software that imitates a certain other software, usually an operating system or environment, on a certain hardware. For our purposes however, it can be thought of as an operating system running in an operating system. Virtual machines are useful because they allow software tasks to be undertaken in precisely defined environments with little repercussion on the host system they run on. These machines themselves can be described by single files representing the equivalent of a hard disk of the machine, as well as a description of the hardware that the virtual machine emulates. This makes them simple to distribute.
Software Related to Virtual Machines¶
Virtual machines must be supported by software in order to function. Only provider software is necessary to run a virtual machine, but managers and provisioners are useful for creating virtual machines and virtual environments respectively.
Virtual machine providers are virtualiser software that supports creating, running, destroying, and other interaction with virtual machines on your computer. VirtualBox (https://www.virtualbox.org) is an example of a virtual machine provider that is open source and freely available under the GNU GPL (https://www.gnu.org/copyleft/gpl.html), and is the provider supported by this project. Other popular provider software includes VMWare, KVM, and Docker. While many cloud computing organisations use virtual machines, they typically use existing provider software.
While not essential for starting virtual machines, specialist software is useful for managing virtual environments. Vagrant (https://www.vagrantup.com) is an example of a virtual machine manager. It provides a command-line interface to the creation and provision of virtual machines from virtual environments. HashiCorp, the company behind Vagrant, also provides a framework for sharing virtual environments. Most importantly for our purpose, Vagrant can be automated to generate virtual machines containing an environment without user intervention. This environment can then be used to complete our objectives. To specify this environment however, provisioning software is required.
Provisioning is the action of running select commands on a machine, virtual or otherwise, to reach a desired end state. By “state”, here we mean how storage is populated with packages, environment definitions, and more. The user of a provisioner describes the desired state of the system, and the provisioner makes it so. In the absence of a provisioner, shell commands can be executed to specify the state, but this becomes unwieldy for large projects because focus is placed on the instructions needed to obtain the desired state, as opposed to the state itself. Provisioning software, such as Ansible (https://www.ansible.com) alleviates this problem. Ansible uses Yet Another Markup Language (YAML) to describe plays to run on a machine to enact the desired end state. Since the focus is on the end state of the system, idempotency is essential.
Virtual machines imitate hardware and software, but must be hosted on a host machine. Virtual machines are provided by provider software running on the host machine, and can be provisioned for use by a provisioner software. Manager software links these two concepts, allows the virtual machine to be preserved and distributed as a virtual environment, and simplifies the creation of virtual machines.
You can learn more about Containers and Related Software, or you can get started as a poweruser, which explains how to create custom environments containing software you choose, as well as instructions for adding new software or configuring your own virtual environment.