Difference between revisions of "Ovirt CentOS 7"
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == | + | ==Ovirt 41== |
WIP | WIP | ||
<br> | <br> | ||
Line 21: | Line 21: | ||
===Add Host=== | ===Add Host=== | ||
After a base install of CentOS 7, install the same repository and have the engine install everything else over SSH. | After a base install of CentOS 7, install the same repository and have the engine install everything else over SSH. | ||
+ | |||
==Ovirt 42== | ==Ovirt 42== | ||
===Single Host Lab Build=== | ===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 <ref>https://www.ovirt.org/documentation/how-to/hosted-engine/#fresh-install</ref> | 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 <ref>https://www.ovirt.org/documentation/how-to/hosted-engine/#fresh-install</ref> | ||
*Make sure to decide on whether firewalld is enabled or not as shown in a known bug<ref>https://bugzilla.redhat.com/show_bug.cgi?id=1348434</ref>. 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. | *Make sure to decide on whether firewalld is enabled or not as shown in a known bug<ref>https://bugzilla.redhat.com/show_bug.cgi?id=1348434</ref>. 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. | *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 | *Configure the NFS share and make sure UID and GID 36 has ownership | ||
+ | ====Commands==== | ||
<pre> | <pre> | ||
yum -y update | yum -y update | ||
Line 33: | Line 36: | ||
systemctl disable firewalld | systemctl disable firewalld | ||
reboot | reboot | ||
− | |||
yum -y install http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm | yum -y install http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm | ||
− | yum -y install | + | yum -y install ovirt-hosted-engine-setup |
+ | reboot | ||
chown 36:36 /<NFS directory> | chown 36:36 /<NFS directory> | ||
− | echo "/<NFS directory> *" >> /etc/exports | + | echo "/<NFS directory> *(rw,anonuid=36,anongid=36,all_squash)" >> /etc/exports |
systemctl enable nfs | systemctl enable nfs | ||
systemctl start nfs | systemctl start nfs | ||
Line 62: | Line 65: | ||
Enter engine admin password: <password> | Enter engine admin password: <password> | ||
Confirm 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 | ||
</pre> | </pre> | ||
+ | |||
===Import from VMWare ESXi=== | ===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. | *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. | ||
Line 68: | Line 74: | ||
*Import a VM from ESXi<ref>https://www.ovirt.org/documentation/vmm-guide/chap-Administrative_Tasks/</ref> | *Import a VM from ESXi<ref>https://www.ovirt.org/documentation/vmm-guide/chap-Administrative_Tasks/</ref> | ||
<br> | <br> | ||
+ | ===Install Agent on CentOS 7=== | ||
+ | <ref>https://www.ovirt.org/documentation/how-to/guest-agent/install-the-guest-agent-in-centos/</ref> | ||
+ | <pre> | ||
+ | yum install centos-release-ovirt42 | ||
+ | yum install ovirt-guest-agent-common | ||
+ | systemctl enable --now ovirt-guest-agent.service | ||
+ | </pre> | ||
+ | ===Update Hosted Engine=== | ||
+ | <ref>https://www.ovirt.org/documentation/self-hosted/chap-Maintenance_and_Upgrading_Resources/</ref><ref>https://www.ovirt.org/documentation/upgrade-guide/chap-Updates_between_Minor_Releases/</ref> | ||
+ | <br> | ||
+ | Updating the hosted engine in hopes to clear up issues with the web interface. There is a bug that is preventing the access of snapshots. You can still take snapshots, and you can roll back using the CLI, but it is easier for most people to roll back using the web UI. | ||
+ | *First, apply any available updates to the hosts using the web UI. | ||
+ | *Then move all VMs off one host. | ||
+ | *Move the hosted engine onto the empty host. The host should now be labeled with SPM. | ||
+ | *Put the cluster into global HA mode. | ||
+ | *SSH into the hosted engine, then run the following. | ||
+ | <pre> | ||
+ | hosted-engine ~ # yum update ovirt\*setup\* | ||
+ | hosted-engine ~ # engine-setup | ||
+ | </pre> | ||
+ | I left defaults during the update. Though the vacuum of the databases might have saved me some time. Further research is needed. | ||
+ | <br> | ||
+ | <br> | ||
+ | I ended up rebooting the engine using the reboot command while SSHd into the engine. This caused the engine to not restart. I found that issuing | ||
+ | <pre> | ||
+ | hosted-engine --start-vm | ||
+ | </pre> | ||
+ | On the host the engine was last on allowed it to come back online. | ||
+ | <br> | ||
+ | <br> | ||
+ | NOTE: All VMs stayed online on their respective hosts during this process, as expected. This kept me online during the procedure as my VPN runs through a VM. | ||
====NOTES==== | ====NOTES==== | ||
Importing VMs using the CLI | Importing VMs using the CLI | ||
<ref>https://access.redhat.com/articles/1353463</ref> | <ref>https://access.redhat.com/articles/1353463</ref> |
Latest revision as of 08:32, 18 August 2018
Contents
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 on CentOS 7
yum install centos-release-ovirt42 yum install ovirt-guest-agent-common systemctl enable --now ovirt-guest-agent.service
Update Hosted Engine
[7][8]
Updating the hosted engine in hopes to clear up issues with the web interface. There is a bug that is preventing the access of snapshots. You can still take snapshots, and you can roll back using the CLI, but it is easier for most people to roll back using the web UI.
- First, apply any available updates to the hosts using the web UI.
- Then move all VMs off one host.
- Move the hosted engine onto the empty host. The host should now be labeled with SPM.
- Put the cluster into global HA mode.
- SSH into the hosted engine, then run the following.
hosted-engine ~ # yum update ovirt\*setup\* hosted-engine ~ # engine-setup
I left defaults during the update. Though the vacuum of the databases might have saved me some time. Further research is needed.
I ended up rebooting the engine using the reboot command while SSHd into the engine. This caused the engine to not restart. I found that issuing
hosted-engine --start-vm
On the host the engine was last on allowed it to come back online.
NOTE: All VMs stayed online on their respective hosts during this process, as expected. This kept me online during the procedure as my VPN runs through a VM.
NOTES
Importing VMs using the CLI
- ↑ https://www.ovirt.org/documentation/admin-guide/chap-Storage/
- ↑ https://www.ovirt.org/documentation/how-to/hosted-engine/#fresh-install
- ↑ https://bugzilla.redhat.com/show_bug.cgi?id=1348434
- ↑ https://www.ovirt.org/documentation/admin-guide/chap-External_Providers/
- ↑ https://www.ovirt.org/documentation/vmm-guide/chap-Administrative_Tasks/
- ↑ https://www.ovirt.org/documentation/how-to/guest-agent/install-the-guest-agent-in-centos/
- ↑ https://www.ovirt.org/documentation/self-hosted/chap-Maintenance_and_Upgrading_Resources/
- ↑ https://www.ovirt.org/documentation/upgrade-guide/chap-Updates_between_Minor_Releases/
- ↑ https://access.redhat.com/articles/1353463