Creating a virtual machine – easy?
How does a virtual machine works? This tutorial will give you an introduction to the world of virtualisation.
In 6 steps, I will show you how to create and use your own Linux virtual machine.
- 1 What is a virtual machine?
- 2 What do I need it for? – 6 use cases
- 3 3 reasons – PRO for a virtual machine
- 4 Practice – Creating a virtual machine
What is a virtual machine?
A virtual machine is a guest operating system in a host operating system that runs independently. The host operating system provides the resources (memory, CPU cores, RAM) that the guest operating system needs to run. From the user’s point of view, the guest operating system runs like a normal programme within the host operating system.
Hypervisor 2 – The engine behind virtual machines
A hypervisor manages memory, CPU, network requests and limits or allocates the resources for the virtual machines on the host operating system. The hypervisor tricks the guest operating system into believing that it is running on real hardware. The software “virtualises” physical hardware resources, which the software allocates to the guest operating system in exact chunks.
Hypervisor 1 – Virtual first
This form of hypervisor runs on the bare metal, the hardware without a fully-fledged host operating system. During operation, the hypervisor 2 system costs more resources because the host operating system requires RAM and computing power.
What do I need it for? – 6 use cases
Why do I need a virtual machine?
A VM has many different uses. The isolation, monitoring, easy recoverability and controllability make the VM interesting for the following test cases:
- Operation: A large chunk of online services do not run on physical servers, but are virtualised.
- Development of an operating system: Anyone working on boot processes and kernel code does not want to operate on their own system.
- Cleanly separated files and programmes: The VM offers strict separation of data and programmes of the different operating systems e.g. private and business, customer 1 and customer 2
- Malware: In order for an antivirus manufacturer to test new malware for its malicious function, it must use a VM. With good hypervisors, only the VM dies, and the host computer does not go up in flames.
- Development environment: A VM is suitable for testing unstable software that can cause the operating system to crash.
- Phishing: You can open dangerous and unknown email attachments within a VM to avoid infection on the main computer.
3 reasons – PRO for a virtual machine
With virtual machines, you can start and stop several operating systems on one computer. You can better utilise CPU, RAM and GPU resources with this strategy.
Test more operating systems
Access to different operating systems at the same time gives you extensive testing options for the programmes. You can test unknown operating systems and use a “quick” VM installation to check whether you want to switch to a different operating system permanently.
VMs offer the advantage of testing operating systems with different computer architectures. Run a VM with Linux or macOS on Windows and run programmes there. Run Windows programmes on Linux with a Windows VM.
Computer architectures – RISC or CISC?
RISC use ARM chips, which are installed in smartphones and IoT devices. Complex Instruction Set Computer (CISC) requires less memory space on the CPU (register).
CISC uses many instructions and microcode sub-processes. Reduced Instruction Set Computer (RISC) requires a lot of memory on the CPU (registers).
Test these out in a VM!
Practice – Creating a virtual machine
As a hypervisor, VMware offers a free product version that you can use for private and university projects. Alternatively, you can use VirtualBox, a kind of open source version. If you can set up a VMWare VM, you can also set up a VirtualBox VM.
#1 VMware ready to run on Windows
- Go to
and download the VMware Workstation Player (NOT PRO).
- Download VMware Workstation XX.X.X Player for Windows 64-bit Operating Systems
- Execute .exe
- Click Next
- Do not use the enhanced keyboard driver
- Let the installation run through
- Confirm that you are not using the software commercially
- The setup is ready for the operating system installation
#2 Download the operating system for the VM
Many Linux operating systems are free.
On distrowatch.com you can see which Linux is currently in vogue. Choose an operating system depending on your purpose, use and requirements. I have created a Linux starter course for beginners, which you can read for free.
Download the latest version of your favourite in 64 bit as an .iso file. The Geek normally burns an .iso file onto a CD or USB stick so that you can switch to a different installation medium when booting the computer. With VMWare, you insert a virtual USB stick into the VM as the installation medium.
The other Linux systems are set up in the same way.
The following image sequence shows the installation of Linux Mint with VMware. All Ubuntu / Debian operating systems with a graphical user interface have similar steps.
#3 Create a virtual machine in VMware
- Create a new machine
- Select ISO
- Search for the ISO file in your file system
- Select Linux
- Select Other Linux 3.x Kernel 64-Bit
- Select a name
- Select the size of the hard drive. My recommendation is at least 80 GB, although only 10 GB would be necessary. As soon as you have installed 4-5 programmes, the 10 GB will overflow.
- Use a 1-FACHE file. This trick will increase the speed of the virtual machine.
- Set the RAM allocation to at least 3 GB, preferably 10 GB and allow the use of 4 CPU cores
- Close all programmes besides VMware and this tab with the tutorial to save RAM. Also close the background services.
#5 Unlock virtualisation
- Open the Group Policy Management
Console Computer Configuration > Administrative Templates > System > Device Guard
- Select the list entry
Turn On Virtualisation Based Security
- Activate and set
Platform Security Levelto
Secure Boot and DMA Protectionand the
Credential Guard Configurationfield to
Enabled with UEFI lock
- Click on Apply and Close
- Open PowerShell with administrator rights (right-click on the icon)
and confirm with Enter
- Do the same with
bcdedit /set hypervisorlaunchtype off
- Restart your computer
#6 Start operating system
- Open VMware
- Start the VM
- Click on the starting boot screen to switch to the guest operating system
- Press any key to initiate the boot process
- Wait until the VM has booted (10s – 10 min depending on computing power)
- Start the installation of the operating system. The installation is similar to the real installation on a real hard drive. Follow the instructions and give the VM a user name and password.