venerdì 17 aprile 2026

[Oracle Linux 10] OS basic installation and virtualization modules enablement - Part 2

In the first part (available here), we saw how to create a VM in ESXi and how to perform the basic installation of the operating system.
In this part, we'll see how to enable virtualization modules in an Oracle Linux environment.

First, we log in to the Oracle Linux server via SSH as shown below and check which x86-64 microarchitecture feature levels your CPU supports, according to the GNU C Library (glibc) dynamic linker, by running the following command:

ol10user@olvm1:~$ sudo /lib64/ld-linux-x86-64.so.2 --help | grep x86-64-v
What to Expect in the Output
When you run this command on a modern Linux system, you will see output that looks something like this:
x86-64-v4 (searched)
x86-64-v3 (supported, searched)
x86-64-v2 (supported, searched)
The output shows the different microarchitecture levels glibc knows about.
(supported, searched): Your CPU supports the instruction sets required for this level. The dynamic linker will look for and use libraries optimized for this level if they exist.
(searched): Your CPU does not support this level. The linker knows about it, but will safely ignore any libraries optimized for it.

What version level means?
Level Era / Architecture Key Instructions Required
x86-64-v1 Baseline (2003) CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SCE, SSE, SSE2
x86-64-v2 Nehalem / Silvermont (2008) CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3
x86-64-v3 Haswell / Excavator (2013) AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE
x86-64-v4 Skylake-X / Zen 4 (2017+) AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL



1. Update packages

Post-installation, before proceeding with any software/package installation, we perform a check to verify if there are packages to update with the following command:
ol10user@olvm1:~$ sudo dnf update -y


2. Install open-vm-tools (optional)

Once the package update is complete, we proceed with installing the VM tools.
If we have installed Oracle Linux in bare metal mode (on physical hardware), next three steps (until reboot of the OS) can be absolutely skipped.

a. Install open-vm-tools
ol10user@olvm1:~$ sudo dnf install open-vm-tools
b. Install open-vm-tools-desktop (only for versions with a graphical interface)
ol10user@olvm1:~$ sudo dnf install open-vm-tools-desktop
c. Restart the virtual machine
ol10user@olvm1:~$ sudo reboot


3. Installing virtualization modules

Let's proceed with installing the packages, however instead of using the `dnf module install virt` command, use the following commands to install the virtualization packages.

a. Install the Virtualization Host Group:
ol10user@olvm1:~$ sudo dnf groupinstall "Virtualization Host"
b. Install Necessary Virtualization Tools:
ol10user@olvm1:~$ sudo dnf install qemu-kvm libvirt virt-install virt-viewer


4. Enable and Start Services

After installation, you need to enable and start the virtualization services.
Start the libvirtd service with full virtualization:
ol10user@olvm1:~$ for drv in qemu network nodedev nwfilter secret storage interface; do
    sudo systemctl enable virt${drv}d.service
    sudo systemctl enable virt${drv}d{,-ro,-admin}.socket
    sudo systemctl start virt${drv}d{,-ro,-admin}.socket
done


5. Validate Setup and Troubleshooting QEMU

Validate setup ...
ol10user@olvm1:~$ sudo virt-host-validate qemu
We're in a virtualized environment, so we're aware of this "Checking Secure Guest Support" warning. This warning shouldn't be present in the physical environment.


6. Enables, starts, and verifies the libvirtd daemon.

We run the following commands to enable, start, and verify the libvirtd daemon, which is the main service used in Linux systems for managing virtual machines (usually KVM/QEMU-based).
ol10user@olvm1:~$ sudo systemctl enable --now libvirtd.service
ol10user@olvm1:~$ sudo systemctl status libvirtd.service  
Check libvirtd service status:
ol10user@olvm1:~$ sudo systemctl list-units --type=socket virt* 


This concludes the second part; where we saw the installation and enabling of the main modules for virtualization in an Oracle Linux environment (KVM/QEMU, libvirt).



Useful links:

– Installing Oracle Linux:
https://docs.oracle.com/en/operating-systems/oracle-linux/10/install/install-PreparingToInstall.html

– Create VMs with KVM on Oracle Linux:
https://docs.oracle.com/en/learn/ol-kvm/index.html#introduction

– KVM Nested Virtualization in Oracle Cloud Infrastructure: A Hands-on Guide with Virtual Machines and Oracle Linux 9.5:
https://blogs.oracle.com/linux/kvm-nested-virtualization-in-oci



That's it.

Nessun commento:

Posta un commento