How to Install CentOS 8 on KVM-QEMU

29/12/2020
KVM
In this article, I am going to show you how to install CentOS 8 on KVM/QEMU virtual machine using Virtual Machine Manager. So, let’s get started.

Downloading CentOS 8 ISO Installation Image

First, visit the official website of CentOS from a web browser. Once the page loads, click on CentOS Linux DVD ISO button as marked in the screenshot below.

Now, click on the mirror link that is geographically closer to you.

Now, click on Save File.

Your browser should start downloading the CentOS 8 ISO installation image. It may take a while for the download to complete.

Moving the CentOS 8 ISO Image to the KVM Storage Pool:

Once the CentOS 8 ISO image is downloaded, you should move the ISO image to your KVM storage pool where you usually keep all your ISO files. In my case, the storage pool is in the path /kvm/iso/.

As you can see, the CentOS 8 ISO image is in the ~/Downloads directory.

$ ls -lh ~/Downloads

Now, move the CentOS 8 ISO image to the KVM ISO storage pool (/kvm/iso in my case) as follows:

$ sudo mv ~/Downloads/CentOS-8-x86_64-1905-dvd1.iso /kvm/iso/

As you can see, the CentOS 8 ISO image is moved to the KVM ISO storage pool.

Creating a KVM Virtual Machine (VM) using Virtual Machine Manager:

Now, open Virtual Machine Manager. Then, right click (mouse) on QEMU/KVM connection and click on New.

Now, select Local install media (ISO image or CDROM) and click on Forward.

Now, click on Browse…

Now, select the CentOS 8 ISO image from the ISO storage pool and click on Choose Volume.

Now, uncheck Automatically detect from the installation media / source, type in red hat in the search box and select Red Hat Enterprise Linux 8.0 (rhel8.0) from the list.

Then, click on Forward.

Now, type in the amount of memory you want this VM to have and the number of CPUs to allocate to the VM.

For CentOS 8 headless Server, 1 GB or 1024 MB is more than enough.

For CentOS 8 Server with GUI, you should at least allocate 3-4 GB or 3072-4096 MB of memory.

Once you’re done, click on Forward.

Now, you have to create a virtual hard disk for the VM.

The default storage pool where the virtual hard disk image will be saved is /var/lib/libvirt/images.

If you want to use the default storage pool, then select Create a disk image for the virtual machine and type in the virtual hard disk size in GB and click on Forward.

If you want to save the virtual hard disk image in a different storage pool, then select Select or create custom storage. Then, click on Manage…

Now, select your storage pool and click on the + button as marked in the screenshot below.

Now, type in a Name of the virtual hard disk file. Also, type in the Max Capacity in GB.

For CentOS 8 headless Server and Server with GUI, 20 GB is enough for most purposes.

Once you’re done, click on Finish.

The virtual hard disk image should be created. Now, select the virtual hard disk image and click on Choose Volume.

Then, click on Forward.

Now, type in a name for the VM and click on Finish.

A new VM should be created.

The VM should automatically start and boot into the CentOS 8 ISO installation image as you can see in the screenshot below.

Installing CentOS 8 on KVM/QEMU VM:

Now, select Install CentOS Linux 8.0.1905 from the list and press <Enter>.

Now, select your language and click on Continue.

Now, click on Installation Destination.

Now, select the virtual hard drive, select Automatic from Storage Configuration section and click on Done.

Now, click on Network & Host Name.

Type in a host name and click on Apply.

Now, click on the toggle button on the top right corner to activate the network adapter. Once the network is activated, click on Done.

If you want to set up your time zone, click on Time & Date.

Now, select your Region and City and click on Done.

If you want to install CentOS 8 server with graphical user interface, then you don’t have to do anything else.

If you want to install CentOS 8 headless server, then click on Software Selection.

Now, select Server and click on Done.

Once you’re happy, click on Begin Installation.

The installation should start.

Now, you have to create a new login user. To do that, click on User Creation.

Type in your personal information, check Make this user administrator and click on Done.

The installation should continue.

Once the installation is complete, click on Reboot.

Once CentOS 8 boots from the virtual hard disk, you can login using the username and password that you’ve set during the installation.

As you can see, I am using CentOS 8 and the Linux kernel version is 4.18.0.

$ cat /etc/redhat-release
$ uname -r

So, that’s how you install CentOS 8 on KVM/QEMU virtual machine. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Install KVM Ubuntu

The full form of KVM is Kernel Virtual Machine. It is a virtualization feature built right into the Linux kernel. With...
29/12/2020

[KVM] Hướng dẫn sử dụng WebVirtCloud

Sau bài cài đặt, mình đã dành vài ngày để thử nghiệm các tính năng và cách sử dụng của WebVirtCloud....
30/12/2020

[KVM][CentOS8] Hướng dẫn cài đăt KVM trên CentOS 8.

CentOS 8 mới được ra mắt ngày 25/09/2019 có nhiều thay đổi và các tính năng mới. Bạn đọc có...
30/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024