HOL: Install and configure Oracle Linux KVM and Oracle Linux Virtualization Manager
Abstract
In this lab learn about the kernel-based virtual machine (KVM) functionality included with Oracle Linux 7, UEK5, and Oracle Linux Virtualization Manager. Walk through the planning and deployment of an infrastructure-as-a-service (IaaS) environment with an Oracle Linux KVM as the foundation. Topics covered include planning storage capacity, creating a logical unit number, planning network bandwidth, and best practices for designing and streamlining the environment through Oracle Linux Virtualization Manager.
Lab Objective
This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment with Oracle Linux KVM and Oracle Linux Virtualization Manager as the foundation. It covers a range of topics, from planning storage capacity, LUN creation, network bandwidth planning, and best practices to designing and streamlining the environment for ease of management.
During this lab, we will create an Oracle Linux KVM demo environment on a single laptop machine, using KVM with nested virtualization.
Minimal Configuration to run this lab
This document can be used to run the lab at home or at your office on your own laptop/desktop/server machine.
In this lab, we use Oracle Linux KVM on the host to create 2 virtual machines that will later be used by Oracle Linux KVM and Oracle Linux Virtualization Manager, so that we can install all software components on a single physical machine.
Since the hypervisor used on the host is KVM, the native operating system on the laptop/desktop/server machine has to be Linux based.
The minimal configuration needed for your laptop/desktop/server is:
The KVM Virtual Machine requirements requirements are:
For the installation of the Oracle Linux KVM node and Oracle Linux Virtualization Manager node you can follow documentation available at: https://docs.oracle.com/cd/F15085_01/F15081/html/index.html
Global Architecture Picture
Important Notes
Acronyms
In the present document, we will use the following acronyms:
Nested Virtualization
In this lab, 2 Virtualization layers are used to emulate a compute/management architecture:
Lab Execution
The first step is to start the Virtual Machines required to run the lab.
Those Virtual Machines have been created on KVM and can be managed by the local GUI utility called "virt-manager"; so, to proceed, open a terminal with "lab" user and execute:
# virt-manager
The "Virtual Machine Manager" windows will open:
As you can see more Virtual Machines are available; the two Virtual Machines required for HOL-5308 are:
Select each of those Virtual Machines and click on "Play" button to start them.
To connect to the Oracle Linux Virtualization Manager web-interface, open a browser a connect to:
Click on "Administration Portal" and login with the following account:
Username: admin
Password: Welcome1
Profile: internal
The OLVM Homepage dashboard will be displayed:
Lab Checks
Before starting to work on the OLVM/KVM environment, proceed to check that everything is correctly configured.
Host
On this environment we have one unique Oracle Linux KVM Host (ol7-kvm); to check the Host status click on "Compute => Hosts"
Once "Host" webpage is opened, we can see the list of KVM hosts configured and managed by Oracle Linux Virtualization Manager; information details immediately available are:
Storage
On this environment we have one unique "Storage Domain"; to check the "Storage Domain" status click on "Storage => Domains"
Once "Storage Domain" webpage is opened, we can see the list of Storage Domains configured and managed by Oracle Linux Virtualization Manager; information details immediately available are:
Network
The Network configuration is based on capabilities of the KVM Hosts; our configured KVM host has two different NICs:
ens6 is also used for the communication between OLVM and OL KVM hosts (ovirtmgmt Network).
To check the "Network" status click on "Network => Networks"
Once "Networks" webpage is opened, we can see the list of Networks configured and managed by Oracle Linux Virtualization Manager; information details immediately available are:
Known issue
Before proceeding with the lab execution, due to a known issue, we have to execute an operation on the OL KVM compute node.
To complete this process, execute following steps:
# ssh root@192.168.122.104
# yum remove vdsm-hook-allocate_net-4.20.46-1.0.7.el7.noarch -y
Lab Steps
During this lab following operations will be executed:
Virtual Network Configuration
On a default OLVM / OL KVM installation the only Virtual Network available is the default "ovirtmgmt" one; this Network can be also used for Virtual Machines but best practices suggest to have a dedicated NIC for Virtual Machines.
To create a new Network, click on "Network => Networks" and then click on "New" button:
On the "New Logical Network" Window, supply following information:
and then click "OK" to confirm the Network creation.
Now, with the "Logical Network" in place, the same has to be associated to a specific Network device (or set of devices) on our KVM host.
The association can be executed by the following steps:
Once "vm-hol" is correctly associated, click on "OK" button to confirm.
By expanding the "Logical Networks" we can now see the "Logical Network vm-hol" associated to the host physical device "ens3"
OVA Import
One of the fastest method to get a Virtual Machine created by OLVM is the OVA Import process.
The Oracle Linux KVM host already has an Oracle Linux 8 OVA file available that can be easily imported, by the GUI, into our environment.
To import the OVA proceed with following steps:
The import process will get more minutes and the machine will remain in "Initializing" status until the process is completed; a padlock icon is also shown on the Virtual Machine row.
While waiting to get the Virtual Machine "ol8" ready, we can also try to import an other type of resource (a Virtual Disk) on the same environment because Oracle Linux Virtualization Manager grants parallel processing.
To accomplish the "Virtual Disk" import, proceed with following steps:
# startx
# wget https://bit.ly/2lObY4i -O ol6.qcow2.gz
# gunzip ol6.qcow2.gz
Original Link is available at:
We had to execute the import "Virtual Disk" operation from the "ol7-olvm" virtual machine because we do not have a valid DNS resolver for the "ol7-olvm" hostname on our laptop; on production or normal environments the "Virtual Disk" import operation can be executed from any client/browser.
So, coming back to the browser running on the laptop we can now proceed to the following steps.
Create a Virtual Machine
In this section we'll create one new "Virtual Machine" starting from the "ol6.qcow2" virtual disk imported.
To complete this section, proceed with the following steps
Before starting both the Virtual Machines "ol6" and "ol8" we still need to apply a configuration change to the "ol8" machine (imported by OVA); by editing the same we need to reduce the values of:
and then proceed to start both the "Virtual Machines" by the "Run" button; while the VMs are starting we can also check their boot-process with the "Console" button
Create a Virtual Machine Snapshot
By this section we'll proceed to get a "Virtual Machine Snapshot" of a running VM.
To get a snapshot of a running Virtual Machine, proceed with the following steps.
The "Save Memory" option cannot be used on this Virtual Machine because we do not have the "guest-agent" installed on the VM itself.
Click "OK" to create the snapshot.
Create a Template
The next step is to create a new "Template" starting from the "Virtual Machine Snapshot"; before proceeding with this step you have to wait to get the "ol8" snapshot completed.
To accomplish this operation, complete following steps:
Deploy a Virtual Machine from a Template
During this lab we already tested/demonstrated the process to create a Virtual Machine by:
and, now, we'll see how to create a "Virtual Machine" from an existing "Template"; to complete this process, complete following steps
and then click on "OK" button to create the "ol8-custom" VM.
This VM will boot with the same hostname of the previous one and there is no option to get it configured on the first boot; the requirement to properly get Templates created is to have within the guest:
Once those tools are installed on the source Virtual Machine, the consequent Template can operate with the "Initial RUN" tab, available on the "New Virtual Machine" window
Further details on "Oracle Linux KVM" and "Oracle Linux Virtualization Manager" are available at on Oracle Documentation Library.
Tidak ada komentar:
Posting Komentar