RHEL 7 Virtualization Host Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(42 intermediate revisions by the same user not shown)
Line 7: Line 7:
* RHEL 7.3
* RHEL 7.3


=Host Prerequisites=
=Virtualization Host Prerequisites=


The host requires minimum 6 GB of free disk space and minimum 2 GB or RAM.
The host requires minimum 6 GB of free disk space and minimum 2 GB or RAM.
Line 13: Line 13:
Installed with 50 GB root partition, 4 GB RAM and 4 GB swap.
Installed with 50 GB root partition, 4 GB RAM and 4 GB swap.


=Host Installation=
=Virtualization Host Installation=


Install the host operating system as described here. The only area in which the installation procedure differs is the storage provisioning. When configuring storage, follow the [[#Storage_Provisioning|Storage Provisioning]] instructions, below:
if the virtualization host runs on a Dell server, install the host operating system following the procedure described here:


{{Internal|RHEL_7/Centos_7_Installation|RHEL 7 Installation}}
{{Internal|Dell Server Install OS with LifeCycle Controller|OS Installation with LifeCycle Controller}}
 
The procedure will update the Dell firmware and drivers and then will pass control to the native O/S installer, that should be driven as described below. Note that '''the only areas in which the virtualization host installation procedure differs from a regular server installation procedure is''' [[#Storage_Provisioning|Storage Provisioning]] '''and''' [[#Virtualization_Host-Specific_Configuration|Virtualization Host-Specific Configuration]]. In consequence:
 
* first configure storage, follow the [[#Storage_Provisioning|Storage Provisioning]] instructions, below.
* then execute the normal server installation procedure [[RHEL_7/Centos_7_Installation|RHEL 7 Installation]].
* then return to  [[#Virtualization_Host-Specific_Configuration|Virtualization Host-Specific Configuration]].


=Storage Provisioning=
=Storage Provisioning=
Line 27: Line 33:
Mount Point: /swap capacity 4 GiB (/dev/sda6)
Mount Point: /swap capacity 4 GiB (/dev/sda6)


Leave the rest of the space unallocated, will create later the LVM pool.
Leave the rest of the space unallocated, will create later the local storage pool for virtual machines using one of the procedures described here: [[Linux Virtualization Operations#Storage_Pool_Configuration|KVM Storage Pool Configuration]].


[[Image:RHELVirtualizationHostStorageConfiguration.png]]
[[Image:RHELVirtualizationHostStorageConfiguration.png]]


=Dell=
=Virtualization Host-Specific Configuration=


=Packages=
==Virtualization Packages==


<pre>
<pre>
yum install -y qemu-kvm qemu-img libvirt virt-manager libguestfs-tools
yum install -y qemu-kvm qemu-img libvirt virt-manager libguestfs-tools libvirt-client virt-install libguestfs-tools-c virt-top virt-what
</pre>
</pre>


scan for other commands
Among other things, installing these packages enables [[Linux_Virtualization_Concepts#libvirtd|libvirtd]] to start at boot, automatically.
 
==Virtualization Host Storage Provisioning==
<span id='Storage_Pool_Provisioning'></span>
 
Create a host [[Linux_Virtualization_Concepts#Storage_Pool|storage pool]] and [[Linux_Virtualization_Concepts#Storage_Volume|storage volumes]], as described here:
 
{{Internal|Linux_Virtualization_Operations#Virtualization_Host_Storage_Operations|Virtualization Host Storage Operations}}
 
Create a directory-based storage pool for DVD ISO images, as described here. We usually expose /iso-images as a storage pool and we add the ISO image files there as storage volumes:
 
{{Internal|KVM_Virtualization_Directory-Based_Storage_Pool_Configuration#Procedure|Directory-Based Storage Pool Configuration}}


=Configure Log Rotation=
==Virtualization Host Network Configuration==


Modify the DHCP range of the default virtual network - or any network being installed - to allow for statically configured addresses. Follow the procedure descried here:
{{Internal|Virsh_net-edit#Modify_DHCP_Range|Modifying the Range of the DHCP Server for a Virtual Network}}
==Enable libvirt-guests==
Enable [[Linux_Virtualization_Concepts#libvirt-guests|libvirt-guests]] and configure guest startup/shutdown behavior:
<pre>
systemctl enable libvirt-guests
</pre>
{{Internal|Linux_Virtualization_Configuration#Configure_Guests_to_Gracefully_Shut_Down|Configure Guests to Gracefully Shut Down}}
{{Internal|Linux_Virtualization_Configuration#Configure_Guests_to_Start_at_Boot|Configure Guests to Start at Boot}}


=Guest Creation=
=Guest Creation=


[[virt-install]]
Create guest as needed, on command-line with [[virt-install]] or from previously generated XML definitions with [[virsh define]]:
 
{{Internal|Linux_Virtualization_Operations#Create_a_Guest_Virtual_Machine|Create a Guest Virtual Machine}}

Latest revision as of 23:54, 17 October 2017

Internal

Relevance

  • RHEL 7.3

Virtualization Host Prerequisites

The host requires minimum 6 GB of free disk space and minimum 2 GB or RAM.

Installed with 50 GB root partition, 4 GB RAM and 4 GB swap.

Virtualization Host Installation

if the virtualization host runs on a Dell server, install the host operating system following the procedure described here:

OS Installation with LifeCycle Controller

The procedure will update the Dell firmware and drivers and then will pass control to the native O/S installer, that should be driven as described below. Note that the only areas in which the virtualization host installation procedure differs from a regular server installation procedure is Storage Provisioning and Virtualization Host-Specific Configuration. In consequence:

Storage Provisioning

Mount Point: /boot capacity 1024 MiB, standard partition xfs file system (/dev/sda3)

Mount Point: / capacity 50 GiB, standard partition xfs file system (/dev/sda5)

Mount Point: /swap capacity 4 GiB (/dev/sda6)

Leave the rest of the space unallocated, will create later the local storage pool for virtual machines using one of the procedures described here: KVM Storage Pool Configuration.

RHELVirtualizationHostStorageConfiguration.png

Virtualization Host-Specific Configuration

Virtualization Packages

yum install -y qemu-kvm qemu-img libvirt virt-manager libguestfs-tools libvirt-client virt-install libguestfs-tools-c virt-top virt-what

Among other things, installing these packages enables libvirtd to start at boot, automatically.

Virtualization Host Storage Provisioning

Create a host storage pool and storage volumes, as described here:

Virtualization Host Storage Operations

Create a directory-based storage pool for DVD ISO images, as described here. We usually expose /iso-images as a storage pool and we add the ISO image files there as storage volumes:

Directory-Based Storage Pool Configuration

Virtualization Host Network Configuration

Modify the DHCP range of the default virtual network - or any network being installed - to allow for statically configured addresses. Follow the procedure descried here:

Modifying the Range of the DHCP Server for a Virtual Network

Enable libvirt-guests

Enable libvirt-guests and configure guest startup/shutdown behavior:

systemctl enable libvirt-guests
Configure Guests to Gracefully Shut Down
Configure Guests to Start at Boot

Guest Creation

Create guest as needed, on command-line with virt-install or from previously generated XML definitions with virsh define:

Create a Guest Virtual Machine