What is a virtual machine and why is it useful
In this video we will understand what is a Virtual Machine and it's use.
We usually cannot install more than one application on a given physical server. We discussed the reasons for this in our previous video.
Until Virtual Machines came into existence, we had a one-to-one mapping between a business application and the physical server upon which it is installed. For example, if there are 3 production apps, 3 physical servers are required. Everytime a new application is required, businesses had to procure a new physical server. There is only one production app running on the server and in most cases, I mean 9 out of 10, the app only use a fraction of the server capacity, may be 5 to 10 percent. What a waste of company money and you can see, how quickly this can become unwieldy and very expensive for the organisations.
What are Virtual Machines
With virtualization, we are able to squeeze much more from physical servers. This is a bit over-simplified, but the model worked something like the following.
On top of the physical server, we have the operating system installed. This is the host operating system i.e operating system at the physical server level. On top of that we install a piece of software called Hypervisor. Hypervisor is a technology from VMware that virtualises the hardware of the physical server. On top of this we create a virtual machine. In fact, we can create and run multiple virtual machines on a single physical server. My first application runs on VM1 and the second application runs on VM2. If I have a thrid application, I simply spin up a new VM and then safely and securely run it from the third VM. This is brilliant, because we are now able to make proper use of the server hardware.
There is no longer a one to one mapping between a business application and a physical server. Thanks to virtualization, we can now safely isolate and run more than one application from a given physical server. So everytime, we need a new application for the business, it is no longer the case where we have to procure 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 that it is running on a dedicated physical server with it's own dedicated processer, 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.
Virtual machines are great. They allow us to run more than one app on a given physical server, which obviously promotes better use of server hardware. However, with each virtual machine that is created there is a lot of overhead. We will discuss what this overhead is and how containers are set out to solve this problem in our next video.
© 2020 Pragimtech. All Rights Reserved.