Visualizzazione post con etichetta KVM. Mostra tutti i post
Visualizzazione post con etichetta KVM. Mostra tutti i post

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.

lunedì 13 aprile 2026

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

Oracle Linux Virtualization


Setting up a virtualization host from scratch is always a great learning experience. Recently decided to test Oracle Linux 10 and its native KVM modules by running the entire setup inside my existing ESXi environment. It's a solid approach to see how it handles before considering a physical deployment. Let's walk through the process of getting Oracle Linux 10 installed and ready for virtualization in a nested scenario.

Before we dive into the setup, let's quickly cover what actually powers virtualization on Oracle Linux 10. Under the hood, it relies on a rock-solid, open-source stack. At its core is KVM (Kernel-based Virtual Machine), which essentially turns the Linux kernel itself into a hypervisor. This is paired with QEMU for hardware emulation, and everything is managed by libvirt, the API and toolkit that lets you interact with your VMs using familiar tools like virsh or Virt-Manager.

Before proceeding with the step-by-step guide, let's see how we created the virtual machine structure.

Let's give a name to the VM for instance "olvm1" (1) and set the following parameters as below (2) and click NEXT (3).

Compatibility ESXi 9.0 virtual machine
Guest OS family Linux
Guest OS version Oracle Linux 10 (64-bit)

We set the CPUs (in my case as in the figure below #2 Socket with #4 cores) (4), and enable the two options "Expose IOMMU to the Guest OS" (5) and the hardware virtualization option "Expose hardware assisted virtualization to the guest OS" (5) (as shown in the image below). This step is very important to enable virtualization features in the guest vm...

... so we configure 32 GB of RAM (6) and 16 GB of disk in Thin Provisioning mode (7)(to save space in the LAB)...

... we just add #4 NICs for future scopes.
The important thing here regarding network settings (which I haven't been able to resolve yet) is the type of adapter to use. I tried VMXNET3 and the vmtools installed in Oracle Linux 10, but I can't get above 10Mb/s. So I decided to set it to E1000e so we can reach 1Gb/s. This will be the subject of future investigations.

Selected the Networks, according to our needs; selected the ISO to install; after a careful review we can conlude the creation of the VM structure pressing the FINISH (8) button.



Let's start here with a quick guide on how to install Oracle Linux 10 and enable the core virtualization modules, powering ON the VM.

We select "Install Oracle Linux 10.1.0" and we hit Enter (9).

We select the installation language (English US is ok) and click on Continue (10).

At the installation summary we start hitting at the localization the Keyboard (11) button...

... press the "+" (12) button and select our keyboard type (Italian in my case) (13) and then Add (14)...

Let's remove the one we don't need, "English US", and click Done (15).

In the installation summary, click "TIME & DATE" (16) to set the correct Time zone.

Once set properly, in our case, Region is Europe and City is Rome (17), click Done (18) to return to the previous menu.

From the main manu, let's select now "Installation Destination" (19).

We select the hard disk (in our case it is the only selectable 16GB one) (20)...

... in some cases, we may need to reclaim disk space, selecting the actual disk (21) and deleting all (22) partitions. Then click Done (23).

We change now the USER SETTINGS by first setting a new root password by clicking on "Root Account" (24) and then creating a new user by clicking on "User Creation" (25) ...

We "Enable root account" (26), we enter a new root password (26) and enable "Allow root SSH login with password" (26). Click Done (27).

Let's create a new user (in our case ol10user) and provide new password.
In our LAB case, we also enable the flag "Add administrative privileges to this user account (wheel group membership)" and "Require a password to use this account", then click Done (28).

It's time to configure our network settings, clicking on "Network & Host Name" (29).

In our case we only need to configure the ethernet ens34 (and leave the others unconfigured for now) to allow the server to be reachable.
We select Ethernet(ens34) (30) > Configure ... (31) ...

... IPv4 Settings (32) > Method Manual (33) > Add (34) a new Address.
In our case the address is 192.168.1.231/24 the gateway 192.168.1.1 (35) as well as for the DNS server 192.168.1.1.(36)
Once everything is set as desired, click Save (37).

We set the new Host Name by typing olvm1 (38)(in our case) Apply (39) and Done (40).

We are now ready to "Begin Installation" (41).

When intallation is Complete, we Reboot System (42).

We log in with the user ol10user ...

This concludes the first part.

That's it.