RHEL7: Configure a physical machine to host virtual guests.

Share this link

Note: This is an RHCSA 7 exam objective.

Prerequisites

Download the CentOS 7 distribution (see Software requirements) and install it with default configuration.

Choose a domain name (example.com strongly recommended), a host name (for example master.example.com) and an IP address compatible with your network environment (here 192.168.1.5, gateway is supposed to be 192.168.1.1).

Update your system:

# yum update

Installation Procedure

Install the KVM packages:

# yum group install "Virtualization Host"
# yum install -y virt-install virt-top libguestfs-tools

Note: The libguestfs-tools brings the very useful virt-sparsify command with it. When space is sparse, this command is invaluable: it limits the virtual machine footprint to the space used only.

Start the libvirtd service:

# systemctl start libvirtd

Activate the Chronyd/NTP service at boot and start it:

# systemctl enable chronyd && systemctl start chronyd

Check the installation:

virt-host-validate
QEMU: Checking for hardware virtualization : PASS
QEMU: Checking for device /dev/kvm : PASS
QEMU: Checking for device /dev/vhost-net : PASS
QEMU: Checking for device /dev/net/tun : PASS
LXC: Checking for Linux >= 2.6.26 : PASS

To get optimal performances, activate the virtual-host tuned profile:

# tuned-adm profile virtual-host

KVM Tip

You have just installed a KVM host but this installation will only last for 1 year. After this period and a reboot, your KVM certificate will expire. Look at this tutorial about KVM certificate expiration to set up an installation for more than 1 year.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.00 out of 5)
Loading...

4
Leave a Reply

Please Login to comment
2 Comment threads
2 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
3 Comment authors
debabrattajCertDepotJaz Recent comment authors
  Subscribe  
newest oldest
Notify of
Jaz
Member
Jaz

Q 1) Do we have to perform all of our exam questions on KVM?
I am currently using vmware workstation to practice RHEL7.

Q 2) Is this all we need to do in exam regarding KVM? Or we have to do more than just installing KVM?

debabrattaj
Member
debabrattaj

When I run this command, on my fedora 25
# yum group install “Virtualization Host”

I got these errors,

Warning: Group ‘Virtualization Host’ does not exist.
Error: Nothing to do.

What should I do now? Is these commands only for CentOS, But all the commands run successfuly except above mentioned one.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create an EXT4 file system mounted by UUID in /etc/fstab under /vol based on a logical volume of 28 logical extents.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria and create a table named people with two columns respectively name varchar(20) and age int(10) unsigned.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...