You are currently viewing Building a Virtual Machine

Building a Virtual Machine

In a previous post about Virtual Machines, I explained the basics of Virtual Machines and how you can set up the most basic form of virtualization on a single workstation.

In this post, I’ll get into more detail on how you create a Virtual Machine and I will explain the two different types of virtualization.

Creating a Virtual Machine

To build a Virtual Machine you can use a Virtual Machine manager. There are quite a lot of options in the market and I already named a few in a previous post about Virtual Machines. 

Just start up the Virtual Machine manager you want to use and select “New Virtual Machine”. This should start a wizard. The wizard helps you to make sure that you are creating the right virtual machine for the guest Operating System (OS) that you want to use. Most hypervisors (the Virtual Machine manager) will have presets for crucial settings. This is done to make sure that your guest OS has the virtual hardware that it needs in order to be able to run. 

Always make sure that your guest OS has at least the minimal virtual RAM, hard drive space, etc. that it requires. In addition to this, you need to give the virtual machine a name as well. 

Once you have named your Virtual Machine, the next step is to assign the amount of memory to your virtual machine. Personally, I would always multiply the basic requirements needed for the OS with two (so x2). If you need 1 GB of RAM for a specific OS, I would assign 2GB instead. The next step is to create the virtual hard drive. Just go with the defaults the first time you set up a Virtual Machine. The last screen will show how big your virtual disk will be. I would at least multiply the default of this with three (so x3). Quite a lot of Hypervisors will suggest much less space so go with a number that makes more sense. In my case, x3 works great to start with. When you build up experience, you can start to tinker with the basic settings to create a setup fully to your own liking. 

Installing the operating system

When you have created the new guest Virtual Machine (VM), you can start with installing the guest operating system. The operating system and the applications invoiced are real so don’t see them as fake software. This brings me to the next “trap” that might be missed by people that didn’t do extensive research: license software. If you installed software that is licensed (for instance Windows) on your actual workstation, installing it on your Virtual Machine will require an additional license. This means you need a separate, legal copy of the software that you already use on your actual workstation in case you install it on your Virtual Machine. Not doing so can lead to fines when you are caught. 

The most popular VM managers all give you the opportunity to use the host machine’s optical drive, a USB thumb drive, or an ISO file of the software you want to use. A very popular way is telling the VM to treat the ISO file as its own optical drive.

When you have completed the installation of the OS you want to run, you can start to use your newly created Virtual Machine. This is great! Now you can start, stop, add, or remove virtual hardware like your VM is an actual machine. 

The true power of the hypervisor that you use is the flexibility of the virtual hardware. If you have a good hypervisor, you can add and remove virtual hard drives, virtual network cards, virtual RAM, etc. with just a few clicks of your mouse button. This way you can adjust your virtual desktop to all the needs you want. 

Servers and virtualization

A lot of servers (for example Web and e-mail servers) are virtualized nowadays. VMWare Workstation and VirtualBox (Oracle) are very powerful desktop applications, used by many hosting companies, business corporations, and private people (incl. hobbyists like me). However, these VMs still need to run on a physical workstation that is already running on an operating system. This system is the host operating system.

The performance can be improved by removing the host operating system completely and installing only a hypervisor. This is done by installing a different type of hypervisor/OS combination and is called a “bare-metal” hypervisor. This name is used because there is no other software between the hypervisor/OS and the hardware: just bare metal. People also call this kind of hypervisor a “Type-1”. “Classic” hypervisors, like VMware Workstation, are described as a “Type-2”. The difference is the host OS and supervisor (your original system) that is between the hypervisor and the hardware with Type-2. With Type-1 there is no host OS.

Type-1 vs Type-2

VMware vSphere with ESX/ESXi, KVM (Kernel-Based Virtual Machine), Microsoft Hyper-V,  Oracle VM, and Citrix Hypervisor are hypervisors, powerful enough to replace the host operating system on a physical workstation. It turns the physical machine into a system that is fully dedicated to supporting the virtual systems. It does nothing more. 

The advantage of this is that you can dedicate all of the available disk space to VM storage. You can even cut out the disks altogether and keep the VMs on specialized devices that consolidate all the drives into a single system and provide storage services to many hosts. This improves performance while it also makes maintaining, administering, and backing up the drives much easier. 

ESXi has only one job: hosting virtual machines. Nothing more.

Enterprise applications and cloud computing mostly use type 1 servers. Mainly because of being independent in hosting the operating system. Type 1 generates less overhead and in case there is a malfunction in an individual VM it does not harm the rest of the system. In addition to this, Type-1 is by far the more secure option because it doesn’t depend on the underlying OS. If under attack, you have a far better chance to fend off the attack than a Type-2 server. Type-2 servers are also a bit less efficient, have slightly less performance, and have slightly less speed. 

Of course, this comes at a price: running type 1 is more expensive in general because of the licensing. This is also the reason why Type-1, Hosted Hypervisors, are still very popular for private use and for Small Businesses (SMBs).

Final Thoughts

I hope this post gives you a bit more insight into how to set up a Virtual Machine, the two different types of virtualization, and when both types are (mostly) being used. The next jump I want to make is to look into how virtualization is affecting cloud computing.

Feel free to contact me if you have any questions or if you have any additional advice/tips about this subject. If you want to keep in the loop if I upload a new post, don’t forget to subscribe to receive a notification by email. 

Gijs Groenland

I live in San Diego, USA together with my wife, son, and daughter. I work as Chief Financial and Information Officer (CFIO) at a mid-sized company.

Leave a Reply