M7 VIRTUAL MACHINE

  • Virtual Machine is often thought of as virtual computers or software-defined computers within physical servers, existing only as a code.

How does a Virtual Machine Work?

  • Virtualization - is the process of creating a software-based, or “virtual” version of a computer, with dedicated amounts of CPU, memory, and storage that are “borrowed“ from a physical host computer.

  • Virtual Machine - is a computer file, typically called an image that behaves like an actual computer. It can run its operating system and applications, enabling multiple virtual machines to operate on a single physical machine, each isolated from one another.

    • The virtual machine is partitioned from the rest of the system, meaning that the software inside a VM can't interfere with the host computer's primary operating system.


Uses of Virtual Machines

  1. Building & deploying apps to the cloud.

  2. Trying out a new operating system (OS), including beta releases.

  3. Spinning up a new environment to make it simpler and quicker for developers to run dev-test scenarios.

  4. Backing up your existing OS.

  5. Accessing virus-infected data or running an old application by installing it on an older OS.

  6. Running software or apps on operating systems that they weren’t originally intended for.

Benefits of using Virtual Machines

  1. Cost savings

  2. Agility & Speed

  3. Lowered downtime

  4. Scalability

  5. Security benefits

While virtual machines run like individual computers with individual operating systems and applications, they have the advantage of remaining completely independent of one another and the physical host machine. A piece of software called a hypervisor, or virtual machine manager, lets you run different operating systems on different virtual machines at the same time. This makes it possible to run Linux VMs, for example, on a Windows OS, or to run an earlier version of Windows on more current Windows OS.

And, because VMs are independent of each other, they're also extremely portable. You can move a VM on a hypervisor to another hypervisor on a completely different machine almost instantaneously.

Because of their flexibility and portability, virtual machines provide many benefits, such as:

  • Multiple OS environments can exist simultaneously on the same machine, isolated from each other.

  • Virtual machine can offer an instruction set architecture that differs from real computers.

  • Easy maintenance, application provisioning, availability, and convenient recovery.

  • Virtualization makes it easy to move instances between physical servers.

  • Virtual machines provide flexibility and portability.


  • Hypervisor - is a form of virtualization software used in Cloud hosting to divide and allocate the resources on various pieces of hardware.

    • Virtualization Hypervisor - a program which provides partitioning, isolation, or abstraction


    Types of Hypervisor

  • Type 1 Hypervisor (Native Hypervisor/ Bare Metal Hypervisor)

    • the hypervisor runs directly on the underlying host system.

    • doesn’t require any base server operating system.

    • has direct access to hardware resources.

  • Type 2 Hypervisor (Hosted Hypervisor)

    • a host operating system runs on the underlying host system. (not directly)

    • often found on endpoints like PC’s

Choosing the Right Hypervisor

  1. Understand your needs

    • Flexibility

    • Scalability

    • Usability

    • Availability

    • Reliability

    • Efficiency

    • Reliable support

  2. The cost of a hypervisor

  3. Virtual machine performance

  4. Ecosystem

  5. Test for yourself

Hypervisor Reference Model

  1. Dispatcher - behaves like the monitor entry and reroutes the instructions for the virtual machine instance to one of the two modules.

  2. Allocator - responsible for deciding the system resources to be provided to the virtual machine instance.

    • Whenever a virtual machine tries to execute an instruction that results in changing the machine resources associated with the virtual machine, the allocator is invoked by the dispatcher.

  3. Interpreter - the interpreter module of interpreter routines. These are executed, whenever a virtual machine executes a privileged instruction.

  • Paravirtualization

    • a virtualization technique that presents a software interface to the virtual machines that is similar, yet not identical, to the underlying hardware-software interface.

    • allows guest operating systems (OSs) installed on a virtual machine (VM) to communicate and manage resources with the hypervisor, creating a collaboration environment.

  • Hypercalls

    • communication between the guest OS and the hypervisor, which are the instructions that the guest OS uses to request services from the hypervisor.

  • Emulation

    • the communication between the guest OS and the hypervisor is done through hypercalls, which are instructions that the guest OS uses to request from the hypervisor.

1. The hypervisor acts as a middleman between the guest OS and the physical hardware which will be assigned to the VM where the guest OS operates 1. The hypervisor is responsible for the management of the physical resources of a data center, server, or device, and allocates them to a guest OS 1. In paravirtualization, because the OS can communicate with the hypervisor via hypercalls, it can request resources “on demand.” This flexible approach allows the guest OS to scale up or down depending on need and better manage resources while increasing performance and security.

Types of Emulation

  1. High-level - simulates the functions of the hardware (faster but less compatible)

  2. Low-level - simulates the hardware of the target system as closely as possible (more accurate but also demanding)

How to install Virtual Machine

  1. Open virtual box and click the new button to create a new virtual machine

  2. Enter a name for the virtual box machine, select the type of operating system you want to install, and then select the version. Click next to continue.

  3. Set up your username and password and select ”next”.

  4. Allocate a portion of the ram to the virtual machine. You can go with the recommended amount or allocate a little more, but make sure you don’t allocate less than the recommended amount or more than half the size of your physical ram. Click next to continue.

  5. Create a virtual hard drive as shown below, you can go with the recommended amount or allocate a little more, but make sure you don’t allocate less than the recommended amount or more than half the size of your storage.

  6. Click “Finish“ and start the virtual machine and select the ISO file to boot from it and install your operating system