Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
redhat:virtualization-redhat:start [2017/09/09 17:33] – [Installation KVM] michael | redhat:virtualization-redhat:start [2020/04/01 10:59] – [KVM Hypervisor on Red Hat / CentOS 8.x] michael | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== KVM Hypervisor | + | ====== KVM Hypervisor |
- | **KVM** | + | |
+ | **KVM** | ||
+ | |||
+ | KVM is known as a so-called | ||
+ | |||
+ | Now I will describe how to set up such a [[https:// | ||
+ | |||
+ | |||
+ | * [[redhat: | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | <WRAP center round important 100%> | ||
+ | <wrap em> | ||
- | <wrap em>Bevor mit der Installation des Hypervisors begonnen wird, solle immer zuerst überprüfen; | ||
< | < | ||
- | # grep -E '(vmx|svm)' / | + | # lscpu | grep Virtualization |
</ | </ | ||
+ | <sxh bash; gutter: false;> | ||
+ | Virtualization: | ||
+ | Virtualization type: full | ||
+ | </ | ||
- | Wenn man nun den Output **vmx** oder **svn** bekommt ist alles in Ordnung. Wenn nichts kommt kann auf diesem Host nicht Visualisiert werden. | + | The output of the above command shows that, our server kvm-virtualization-01.recipes.com supports Virtualization. |
- | ---- | + | However, if the above command returns no result on your server then, |
+ | - '' | ||
+ | - '' | ||
+ | </ | ||
- | ===== Installation von KVM ===== | + | |
- | Jetzt kann die Installation von KVM durchgeführt werden. Als erstes werden dafür die benötigten Pakages installiert. | + | |
+ | |||
+ | ===== Installing | ||
+ | |||
+ | |||
+ | In CentOS 8 / RHEL 8, virtualization components including | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | We are installing virt module using dnf command. | ||
< | < | ||
- | # yum install | + | # dnf install -y @virt |
</ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | We are also installing virt-install package, because it provides some very useful command line tools. | ||
+ | |||
+ | < | ||
+ | # dnf install -y virt-install | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP center box 100%> | ||
+ | Validate all the components on your KVM host can support virtualization. | ||
+ | |||
+ | < | ||
+ | # virt-host-validate | ||
+ | </ | ||
+ | |||
+ | <sxh bash; gutter: false;> | ||
+ | QEMU: Checking for hardware virtualization | ||
+ | QEMU: Checking if device /dev/kvm exists | ||
+ | QEMU: Checking if device /dev/kvm is accessible | ||
+ | QEMU: Checking if device / | ||
+ | QEMU: Checking if device / | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for cgroup ' | ||
+ | QEMU: Checking for device assignment IOMMU support | ||
+ | QEMU: Checking if IOMMU is enabled by kernel | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Nach erfolgreicher Installation müssen die Services gestartet & aktiviert werden. | Nach erfolgreicher Installation müssen die Services gestartet & aktiviert werden. | ||
Line 25: | Line 105: | ||
# systemctl enable libvirtd | # systemctl enable libvirtd | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Nun sollte überprüft werden, ob KVM erfolgreich seine beiden Core-Module laden konnte. | Nun sollte überprüft werden, ob KVM erfolgreich seine beiden Core-Module laden konnte. | ||
Line 49: | Line 134: | ||
</ | </ | ||
- | ---- | ||
===== Vorbereitungen zu starten des Virt-Managers ===== | ===== Vorbereitungen zu starten des Virt-Managers ===== | ||
Line 68: | Line 152: | ||
</ | </ | ||
- | ---- | + | |
===== Starten des Virt Managers ===== | ===== Starten des Virt Managers ===== | ||
Line 133: | Line 217: | ||
# ip addr show br0 | # ip addr show br0 | ||
</ | </ | ||
+ | |||
===== Start Creating Virtual Machines. ===== | ===== Start Creating Virtual Machines. ===== | ||
- | Now Create Virtual Machine either from the command line using ' | + | Create Virtual Machine either from the command line using ' |
- | Now let’s Create a virtual machine of '' | + | <WRAP center box 100%> |
+ | '' | ||
- | Start the “virt-manager” | + | - Start the “virt-manager” |
+ | - Go to the File Option, click on '' | ||
+ | - We will be using ISO file as installation media. In the next step Specify the path of ISO file.{{: | ||
+ | - Click on Forward. And specify the Compute Resources : RAM and CPU as per your setup. {{: | ||
+ | - Click on Forward to proceed further. Then specify the storage Size of Virtual Machine, In my case I am using 25G.{{: | ||
+ | - In the Next step Specify the Name of Virtual Machine and select network as **Bridge br0**{{: | ||
+ | - Click on Finish to start the installation. {{: | ||
- | Go to the File Option, click on '' | + | '' |
- | {{: | + | </ |
- | + | ||
- | We will be using ISO file as installation media. In the next step Specify the path of ISO file. | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Click on Forward. | + | |
- | + | ||
- | Specify the Compute Resources : RAM and CPU as per your setup. | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Click on Forward to proceed further. | + | |
- | + | ||
- | Specify the storage Size of Virtual Machine, In my case I am using 25G. | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | In the Next step Specify the Name of Virtual Machine and select network as **Bridge br0** | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Click on Finish to start the installation. | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Follow the screen instructions and complete the installation. | + | |
Line 182: | Line 248: | ||
The above **virt-install** command consitst of following options : | The above **virt-install** command consitst of following options : | ||
- | * **–name** = <Name of the Virtual Machine> | + | * '' |
- | * **–file** = < | + | * '' |
- | * **–file-size** = < Size of the Virtual Machine, in my case it is 20GB > | + | * '' |
- | * **–nonsparse** = < Allocate the whole storage while creating> | + | * '' |
- | * **–graphics** = < Specify the graphical tool for interactive installation, | + | * '' |
- | * **–vcpu** = < Number of virtual CPU for the Machine > | + | * '' |
- | * **–ram** = < RAM size for the virtual Machine > | + | * '' |
- | * **–cdrom** = < Virtual CD ROM which specify the installation media like ISO file > | + | * '' |
- | * **–network** = < it is used to specify which network we will use for the virtual machine, in this example I am bridge interface> | + | * '' |
- | * **–os-type** = < Operating system type like linux and window> | + | * '' |
- | * **–os-variant**= <KVM maintains the OS variants like ‘fedora18′, | + | * '' |
- | Open now the Virt Viewer //(on Windoff)// and follow the instruction to complete the installation. | + | Open now the Virt Viewer //(on Windows)// and follow the instruction to complete the installation. |
{{: | {{: | ||
Line 207: | Line 273: | ||
That’s it, basic installation and configuration of KVM hypervisor is completed. | That’s it, basic installation and configuration of KVM hypervisor is completed. | ||
- | ---- | ||
<WRAP center box 100%> | <WRAP center box 100%> | ||
Line 214: | Line 279: | ||
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
Line 226: | Line 292: | ||
- | ---- | ||
===== Redhat Dokumentation zum Thema ===== | ===== Redhat Dokumentation zum Thema ===== |