Install and Configure Redhat Virtualization (RHEV)

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4
At a glance
Powered by AI
The key steps outlined include installing RHEV-M, joining a domain, configuring networking settings like the MAC address pool, uploading necessary ISO files and configuring permissions on them, collecting logs, backing up databases, and powering on and off VMs from the command line.

The steps outlined to install and configure RHEV-M include running yum update and install on the necessary RPMs, using rhevm-setup to initialize the environment, joining a domain with rhevm-manage-domains, and configuring the MAC address pool with rhevm-config.

To upload ISOs, the steps shown are to copy files like virtio-win.vfd and rhev-tools-setup.iso to the ISO share and set permissions on the uploaded files with chown. The ISO domain, path and permissions are also configured.

Red Hat Enterprise Virtualization,RHEV,RHCVA

*********************************************

Install and configure RHEV-M


============================
yum update -y
reboot
yum install rhevm rhevm-reports -y
rhevm-setup
rhevm-dwh-reports
rhevm-reports-setup
NB: Reboot is required only if a new kernel is installed by yum update -y
Join domain
===========
rhevm-manage-domains -action=add -domain=example.com -user=domainuser -provider=
IPA -interactive
To see all available parameters, simply run rhevm-manage-domains. For instance
you will see the supported providers are IPA,RHDS (Red Hat Directory Services)
and ActiveDirectory.
Set Mac Address
===============
rhevm-config -a | grep -i mac
rhevm-config -g MacPoolRanges
MacPoolRanges: 00:1A:4A:18:04:00-00:1A:4A:18:04:FF version: general
[root@rhevm ~]# rhevm-config -s MacPoolRanges=52:54:00:56:04.01-52:54:00:56:04.6
3
[root@rhevm ~]# rhevm-config -g MacPoolRanges
MacPoolRanges: 52:54:00:56:04.01-52:54:00:56:04.63 version: general
52:54:00 -> man virt-install

Upload ISOs to ISO domain


========================

[root@rhevm ~]# cp /usr/share/virtio-win/virtio-win.vfd /exports/iso/7c6b6474-0


640-420c-8721-31e32013b887/images/11111111-1111-1111-1111-111111111111/
[root@rhevm ~]# cp /usr/share/rhev-guest-tools-iso/rhev-tools-setup.iso /export
s/iso/7c6b6474-0640-420c-8721-31e32013b887/images/11111111-1111-1111-1111-111111
111111/
root@rhevm ~]# cd /exports/iso/7c6b6474-0640-420c-8721-31e32013b887/images/11111
111-1111-1111-1111-111111111111/
[root@rhevm 11111111-1111-1111-1111-111111111111]# chown 36.36 *.*

Collect logs
=============
# rhevm-log-collector
Backup database
================
# ./backup.sh -d engine -u postgres
To list databases
=================
# psql -U username
\l
Backup Manager Configuration
============================
# tar --xattrs -cvf backup.tar /root /etc /usr/share/ovirt-engine*
irt-engine/

/var/lib/ov

Linux VM template, Sealing Procedure


====================================
1. Log in to the virtual machine. Flag the system for re-configuration by runnin
g the following command as root:
# touch /.unconfigured
man sys-unconfig
2. Remove ssh host keys. Run:
# rm -rf /etc/ssh/ssh_host_*
3. Set HOSTNAME=localhost.localdomain in /etc/sysconfig/network
4. Remove /etc/udev/rules.d/70-*. Run:
# rm -rf /etc/udev/rules.d/70-*
5. Remove the HWADDR= line from /etc/sysconfig/network-scripts/ifcfg-eth*.
6. Optionally delete all the logs from /var/log and build logs from /root.
7. Shut down the virtual machine. Run:
# poweroff
Another method to clear system specific information

===================================================
yum install libguestfs-tools -y
virt-sysprep list
virt-sysprep -a diskimage clears all in the list by default

firstboot method to reconfigure Linux


=====================================
yum install -y firstboot
chkconfig firstboot on
cat /etc/sysconfig/firstboot
RUN_FIRSTBOOT=NO
Change it YES
touch /etc/reconfigSys
Exporting and editing disk images
===================================
Export a VM
guestfish -i -w -a /path/to/diskimage

Create, kill VM from command line


=================================

Kill VM by process ID
=====================
[root@desktop9 ~]# ps aux | grep rhevm
qemu
19809 40.7 8.0 4947312 642908 ?
Sl 08:28 0:10 /usr/libexec/qe
mu-kvm -S -M rhel6.3.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -n
ame rhevm -uuid 326d6930-0126-673b-06d4-01490eda643e .....

[root@desktop9
[root@desktop9
root
19955
[root@desktop9

~]# kill -9 19809


~]# ps aux | grep rhevm
0.0 0.0 103240 852 pts/0
~]#

S+

08:29

0:00 grep rhevm

Alternate method 1
==================
# virsh

virsh # list
Id
Name
State
---------------------------------------------------9
rhevm
running
virsh # shutdown rhevm
Domain rhevm is being shutdown
virsh # list
Id
Name
State
---------------------------------------------------9
rhevm
running

Note: "destroy VMname" for force poweroff

Create VM
=========
virt-install --name mykvm --ram 1024 --disk path=/var/lib/libvirt/images/mykvm,s
ize=4 --cdrom rhel-server-6.3-x86_64-dvd.iso
man virt-install

You might also like