Ovirt CentOS 7

From Michael's Information Zone
Jump to navigation Jump to search

Ovirt 41

WIP
[1]Since this is a hosted engine install, we need to have the storage up and runnning first. In this case we needed to configure a remote NFS server to host the data.

mkdir -p /exports/data
groupadd kvm -g 36
useradd vdsm -u 36 -g 36
chown -R 36:36 /exports/data


After base installation of CentOS 7

yum install epel-release
yum update -y
reboot
yum install -y http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm
yum install -y ovirt-hosted-engine-setup
hosted-engine --deploy

Add Host

After a base install of CentOS 7, install the same repository and have the engine install everything else over SSH.

Ovirt 42

Single Host Lab Build

Over View

Very simple setup. Make sure to have enough space for the NFS share. In this example I setup a quick single host (Dell server) for proof of concept in using Ovirt as disaster recovery for ESXi [2]

  • Make sure to decide on whether firewalld is enabled or not as shown in a known bug[3]. For a quick test I decided to disable most security such as the firewall, selinux, and allowing everything to access the NFS share if they pretend to be the vdsm user. This will not be the case for production.
  • Set the host name to resolve locally for both the host and the hosted engine.
  • Configure the NFS share and make sure UID and GID 36 has ownership

Commands

yum -y update
sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
reboot
yum -y install http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm
yum -y install ovirt-hosted-engine-setup 
reboot
chown 36:36 /<NFS directory>
echo "/<NFS directory> *(rw,anonuid=36,anongid=36,all_squash)" >> /etc/exports
systemctl enable nfs
systemctl start nfs
screen hosted-engine --deploy

Below are the none-default settings I had to set.

          Please provide the FQDN you would like to use for the engine appliance.
          Note: This will be the FQDN of the engine VM you are now going to launch,
          it should not point to the base host or to any other existing machine.
          Engine VM FQDN: (leave it empty to skip):  []: <hostname entered into /etc/hosts>

...
          Enter root password that will be used for the engine appliance: <password>
          Confirm appliance root password: <password>
...
          How should the engine VM network be configured (DHCP, Static)[DHCP]? static 
          Please enter the IP address to be used for the engine VM [<address picked by ovirt>]: <enter static IP associated with the /etc/hosts entry>
...
         Add lines for the appliance itself and for this host to /etc/hosts on the engine VM?
          Note: ensuring that this host could resolve the engine VM hostname is still up to you
          (Yes, No)[No] yes
...
          Enter engine admin password: <password>
          Confirm engine admin password: <password>
...
          Please specify the full shared storage connection path to use (example: host:/path): <local host IP>:/NFS 

Import from VMWare ESXi

  • Add an external provider. Though this is not necessary as you can add this information during the import process. However this will cut down on the steps for each manual import.

Next step will be to script this process.[4]

  • Import a VM from ESXi[5]


Install Agent opn CentOS 7

[6]

yum install centos-release-ovirt42
yum install ovirt-guest-agent-common
systemctl enable --now ovirt-guest-agent.service

NOTES

Importing VMs using the CLI

[7]