In computing, a virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.
There are different kinds of virtual machines, each with different functions:
- System virtual machines (also termed full virtualization VMs) provide a substitute for a real machine. They provide functionality needed to execute entire operating systems. A hypervisor uses native execution to share and manage hardware, allowing for multiple environments which are isolated from one another, yet exist on the same physical machine. Modern hypervisors use hardware-assisted virtualization, virtualization-specific hardware, primarily from the host CPUs.
- Process virtual machines are designed to execute computer programs in a platform-independent environment.
Some virtual machines, such as QEMU, are designed to also emulate different architectures and allow execution of software applications and operating systems written for another CPU or architecture.
- Operating-system-level virtualization allows the resources of a computer to be partitioned via the kernel. The terms are not universally interchangeable.
In operating-system-level virtualization, a physical server is virtualized at the operating system level, enabling multiple isolated and secure virtualized servers to run on a single physical server. The "guest" operating system environments share the same running instance of the operating system as the host system. Thus, the same operating system kernel is also used to implement the "guest" environments, and applications running in a given "guest" environment view it as a stand-alone system. A well known variant of this type is Docker Containers.
In City Cloud, we offer mainly System virtual machines, but can also offer the other two types as well.
Once the infra structure is setup and delivered, one can choose to deploy operating systems, or complete packages with operating systems, plus different applications out-of-the-box, to the virtual machines availble in the project.
On creation of a virtual machine, a flavor is needed, this is to instruct Nova on how to build the virtual machine in terms of number of virtual CPU:s (aka Cores), amount of virtual RAM (in terms of GB) and volume size for the "internal storage", or more correct system disk of the virtual machine. Further details are found under the section Server Flavours.
It is possible to group several virtual machines together in server groups to control the scheduling of a group of servers. A server group can have two different policys - affinity and anti-affinity.
A server group with policy affinity will make sure that all the server in that group will be placed at the same compute host (hypervisor). A suitable use case for this can be when hosting services that are tightly connected and frequently communicating with each other.
A server group with the policy set to anti-affinity will make sure that none of the servers within that server group always will be placed at different compute host (hypervisor). This is a suitable use case for services that requires high availability, for example a database cluster, where a potential problem of one of the hypervisors won't affect the uptime of the service if self.