What to do after installing Linux Ubuntu 4

Linux Ubuntu and virtual machines

What to do after installing Linux Ubuntu?  It would be great if we can transform Linux Ubuntu into fully operational testing lab for all variety of virtual machines (guests). Installing virtualization packages will give you opportunity to try all kinds of Linux flavours like CentOS, Linux Lite, Debian etc.

This task we are going to preform with qemu-kvm hypervisor because this is a great way to learn all about virtual machines and their relationships with each other.

Real hardware components
Real expensive hardware components

Let’s try to explain in the most simple way, before this great features arrived you would needed plenty of real physical hardware, such as – two or three computers, some network cards, cables, switches etc.

…and that was a really expensive way to learn.

Using qemu-kvm virtualization has ability to virtually create networks which will consists of as many virtual computers you want.

This is the best for learning all about networking and plenty more! This part – Installing Linux Ubuntu 4 is giving you all that you ever wanted!

For example, if you interested in learning how to connect from one computer to another via ssh there are no better way then using virtual machines.

Using qemu-kvm hypervisor you will be able to create a virtual machine on which you would like to connect, and this virtual computer will have the same features like a real one.

Virtual machines are great for making all kind’s of tests even a “dangerous ones”, because while experimenting in this environment “nothing can be break”. Virtual machine has it’s own core components (kernel) and if you make a mistake all that can be damaged is the virtual machine, not a real computer (host).

How to test if my computer has virtualization features

Let’s find out if your real hardware supports virtualization features:

user@linux2u:~$ egrep -c '(vmx|svm)' /proc/cpuinfo
1

…if you get 1 as result this means that virtualization feature is available on your computer.

Installing virtualization packages for creating virtual machines

Now you findout your cpu has virtualization ability enabled, proceed installing virtualization software packages.

If the results of tests failed(result zero), look in uefi/bios and try to enable virtualization features.

user@linux2u:~$ sudo apt install bridge-utils libvirt-bin qemu qemu-kvm virt-manager

…this process will take a while, when finished try to turn on libvirtd daemon and qemu-kvm

Starting virtualization daemons

user@linux2u:~$ sudo systemctl start libvirtd
user@linux2u:~$ sudo systemctl start qemu-kvm

# if you wish you can enable those at startup

user@linux2u:~$ sudo systemctl enable libvirtd 
user@linux2u:~$ sudo systemctl enable qemu-kvm

For this demonstration we will create virtual machine called vbox1 based on Linux Lite distribution, because Linux Lite is small distribution and will be  downloaded quickly.

Downloading our desired operating system for virtual machine

You can download this distribution on Linux Lite website reasonable choice would be some x64 bit version iso file. At a time i writing this tutorial my downloaded version was 4.8.

So let’s make this clear – this file is an operating system, just like Linux Ubuntu and we making virtual machine with Linux Lite operating system.

Now it’s time to activate virtual machine manager with this command

user@linux2u:~$ sudo virt-manager
Linux Virtual Machine Manager by libvirt
Virtual Machine Manager by libvirt

If you hover on icons there is a first icon on the top called Create New Virtual Machine, just click on it!

Creating virtual machine vbox1

creating new virtual machine on Linux Ubuntu using qemu/kvm

On this menu click Forward, and find your downloaded operating system file

choosing operating system iso file for virtual_machine

Click on Browse

Selecting operating system iso file on Linux Ubuntu host system

Click on Browse Local and find your iso file, in my example this file was called linux-lite-4.8-64bit.iso , which representing operating system.When finished this step click Forward.

 

Choosing Memory and CPU settings for virtual machine vbox1

choosing memory and cpu for virtual machine on Ubuntu 18.04

You can adjust amount of Memory for new virtual machine, this depends on how much real physical ram you have. Usually this is just for testing purposes so leave it to 1024 MB and one cpu core.

I have two core processor on my computer, and plenty of ram cca 12GB so sometimes i put 2048 MB to my virtual machines (it’s the case i need virtual machine with graphical desktop).

Creating virtual disk for vbox1 virtual machine

Creating disk for virtual machine on Linux Ubuntu 18.04 host

What to do after Installing Linux Ubuntu 4 – Making virtual disk for virtual machine. Since this is very small distribution 10 GB is going to be enough.

Creating virtual machine called vbox1on Linux Ubuntu operating system

Click Finish – After this step your operating system Linux Lite will boot up from iso file, this would be like you’ve put cd installation media in cd rom device in real life.

Installing Linux Lite

Linux Lite boot menu

On this menu just hit enter and wait for your system to load. Our work is almost done, now you can install Linux Lite on virtual disk.

Install procedure is the same like installing Ubuntu distribution, because this distribution is also based on Ubuntu . When system completely loads choose icon Install Linux on the Desktop and installation process will start.

After clicking Install Linux adjust usual settings like keyboard, etc. – furthermore the tricky part would be setting partitions, this link on previous article will help you because it’s quite similar (you will ignore windows partitions).

The point is – whatever you do here it would not destroy host system installation, even if you erase or format your virtual disk,because this  new system has its own kernel.

In this article “What to do after installing Linux Ubuntu 4” you’ve learn how to:

  • test your computer cpu for virtualization features
  • install virtualization software packages
  • create virtual machine
  • install new operating system

If you need more information about kvm (kernel virtual machine) visit this link:  https://www.linux-kvm.org

 

Author: Krunoslav Kralj

Im Linux enthusiast from Croatia using Linux for 13 years! My first Linux was - Ubuntu 7.10 (Gutsy Gibbon), released on 18 October 2007. After some time iv'e switched to Centos 6. Im still using Ubuntu for my daily tasks, and i really miss my Centos 6 which reminds me to some older versions of Ubuntu.

Leave a Reply

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