Virtual Machines in Cloud Computing

Virtual Machines in Cloud Computing

In this article, I will discuss Virtual Machines in Cloud Computing. Please read our previous article discussing What is Cloud Computing. But before understanding Virtual Machines, let us first understand the state of IT before Virtual Machines came into existence.

Application Without Virtual Machines:

In today’s world, almost every industry and business, such as hotels, banks, airlines, tourism, shopping malls, online portals, and hardware, depends on applications to power and operate their operations. Thus, reliable, high-performing, and scalable applications are essential for any business to succeed in today’s competitive market. There are two important factors to consider when dealing with applications:

  • Designing and Developing the Business Application: Creating an application based on the needs of the business.
  • Hosting the Application: Host the application on a server to make it available for the business so it can be accessed by users.

Now, let’s discuss how we hosted the application before Virtual Machines and containers came into the picture. Once we understand this, we will discuss virtual machines and how they overcome problems.

Hosting Applications Before Virtual Machines

Before the introduction of Virtual Machines (VMs) and Containers, businesses had to procure physical servers to host their applications. This process involved several challenges:

Procuring Physical Servers:
  • Businesses needed to determine the size and speed of the server required, which was difficult to estimate accurately from the beginning.
  • To avoid underestimating needs, businesses often purchase high-end servers, resulting in high initial costs.
Ongoing Costs:
  • In addition to the initial cost of the physical server, there were recurring monthly expenses, such as energy costs for power and cooling and hiring staff to maintain the servers.
  • Operating system licenses for the servers were also added to the expenses.
  • Typically, only a small fraction (about 5% to 10%) of the server’s capacity was used, leading to significant waste of company resources.
How Do We Host the Application?

To get started, we need a physical server.

  • A physical server was procured.
  • An operating system (OS) such as Windows or Linux was installed on the server.
  • The business application was then installed on top of the operating system.

Once this is complete, our application will be ready for use, and users can access it.

How we host the application?

Now, let’s say we are launching a new product or starting another business, and obviously, this means we need another business application. So, we need to go for another physical server and another operating system license, and on top of that, we need to install our second business application. Keep in mind that in addition to the cost of this second physical server, we also have monthly recurring operating expenses.

Application without Virtual Machines

At this point, you might be wondering, can’t we install this new business application on our existing physical server because the first business application only uses a fraction of the server capacity? While it is possible in some cases, it is not always feasible.

Why Can’t We Host on the Existing Physical Server?

We cannot host on the existing physical server for multiple reasons.

  • Compatibility Issues: The new application might require different system dependencies, a different version of the framework, or even a different operating system.
  • Resource Conflicts: Running multiple applications on the same server can lead to conflicts over shared resources like memory and processing power.

Why can’t we host in the existing physical server?

One solution would be to purchase a new physical server for each application. So, in the past, businesses often followed a one-to-one mapping between applications and physical servers. A new physical server was purchased every time a new business application was needed. This approach quickly became unwieldy and expensive, with many servers using only a small portion of their capacity. What a waste of company money. This is the model we had until virtualization came into existence.

What are Virtual Machines in Cloud Computing?

Virtual Machines (VMs) in cloud computing are a form of virtualization technology that allows us to create and run multiple instances of virtual computers on a single physical server. Each virtual machine operates as an independent and isolated entity, running its own operating system (OS) and applications like a physical computer. Nowadays, virtualization allows us to maximize the potential of physical servers. For a better understanding, please look at the following diagram.

What are Virtual Machines in Cloud Computing?

On top of the physical server, we have installed the operating system. This is the host operating system, i.e., the operating system at the physical server level. On top of that, we installed a software called Hypervisor. Hypervisor is a VMware technology that virtualizes the physical server’s hardware. We use a Hypervisor to create virtual machines. On top of this, we create a virtual machine. We can create and run multiple virtual machines on a single physical server. My first application runs on VM1, and the second runs on VM2. If I have a third application, I create a new VM and safely and securely run it from the new VM. This approach is excellent because it maximizes the use of server hardware.

If you look at the above virtualization diagram, you will observe that no one-to-one mapping exists between a business application and a physical server. Virtualization allows us to safely isolate and run more than one application from a given physical server. So, every time we need a new business application, we no longer have to purchase a new physical server. With virtualization, we are able to safely and securely run multiple apps on a single physical server.

Because of this virtualization, each application thinks it is running on a dedicated physical server with its own dedicated processor, memory, drive space, etc, while in reality, they are running on the same physical server but on a dedicated virtual machine. You can think of a virtual machine as a computer within a computer. Multiple virtual machines can run simultaneously on the same physical server. In each virtual machine, we can install an operating system of our choice (Windows, Linux, etc.); typically, we install the operating system and dependencies our production app requires.

So, what exactly is a virtual machine?

Think of a virtual machine as a computer that exists within another computer. It’s possible to run several virtual machines on one physical server at once. You can install any operating system you prefer (e.g., Windows, Linux) on each virtual machine and install the necessary software and dependencies to meet the application requirements.

Popular virtualization platforms used in cloud computing include VMware, Microsoft Hyper-V, Xen, and KVM (Kernel-based Virtual Machine). Cloud providers like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) offer VM instances as a core service, allowing users to create and manage VMs in the cloud.

Key Characteristics of Virtual Machines (VMs):

The following are the Key Characteristics of Virtual Machines (VMs):

  • Isolation: VMs provide complete isolation from each other, ensuring that each VM operates independently.
  • Resource Allocation: VMs have dedicated resources (CPU, memory, storage) allocated to them, which can be adjusted as needed.
  • Full Operating System: Each VM runs its own full-fledged operating system, making it suitable for running different OSes on the same hardware.
Use Cases for Virtual Machines

Server Consolidation: An organization has several underutilized physical servers, each running a single application. By consolidating these servers into VMs on a single physical machine, the organization can optimize resource usage, reduce hardware costs, and simplify management.

Running Multiple Operating Systems: A development team needs to test their application across different operating systems (Windows, Linux, macOS). VMs allow the team to run multiple operating systems on a single physical machine, enabling comprehensive testing and ensuring compatibility across different environments.

Legacy Application Support: A company relies on a legacy application that requires an outdated operating system. VMs can run older operating systems, allowing the company to continue using the legacy application without maintaining old hardware.

Cloud Computing: A company wants to use cloud computing for scalable and on-demand computing resources. Cloud providers offer VMs as a service (e.g., Amazon EC2, Microsoft Azure VMs), enabling companies to deploy applications in the cloud, scale resources as needed, and pay only for what they use.

In the next article, I will discuss Containers in Cloud Computing and how containers overcome the problems of Virtual Machines in Cloud Computing. In this article, I try to explain virtual machines in cloud computing in detail, and I hope you enjoy this article.

Leave a Reply

Your email address will not be published. Required fields are marked *