Reference
https://www.ovirt.org/documentation/
Host OS : Ubuntu 16.04
ovirt-engine : install ovirt-engine on CentOS7 LXC container
ovirt-node : run ovirt-engine as virtual machines under KVM. ( nested KVM )
Each node has only one NIC.
[ install ovirt-engine on CentOS7 LXC container ]
launch a CentOS7 container and install ovirt-engine.
$ lxc launch cent7 -p b-net b-ovirt-engine
$ lxc exec b-ovirt-engine bash
# yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm
# yum -y install ovirt-engine
|
set up ovirt-engine.
I have set OVN to false because I am not familiar with this..
Set up ovirt-provider-ovn : False
[root@b-ovirt-engine ~]# engine-setup
[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf']
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20180330042732-s9f5p3.log
Version: otopi-1.7.7 (otopi-1.7.7-1.el7.centos)
[ INFO ] Stage: Environment packages setup
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup
[ INFO ] Stage: Environment customization
--== PRODUCT OPTIONS ==--
Configure Engine on this host (Yes, No) [Yes]:
Configure ovirt-provider-ovn (Yes, No) [Yes]: No
Configure Image I/O Proxy on this host (Yes, No) [Yes]:
Configure WebSocket Proxy on this host (Yes, No) [Yes]:
* Please note * : Data Warehouse is required for the engine.
If you choose to not configure it on this host, you have to configure
it on a remote host, and then configure the engine on this host so
that it can access the database of the remote Data Warehouse host.
Configure Data Warehouse on this host (Yes, No) [Yes]:
Configure VM Console Proxy on this host (Yes, No) [Yes]:
--== PACKAGES ==--
[ INFO ] Checking for product updates...
[ INFO ] No product updates found
--== NETWORK CONFIGURATION ==--
Host fully qualified DNS name of this server [b-ovirt-engine]:
[WARNING] Host name b-ovirt-engine has no domain suffix
--== DATABASE CONFIGURATION ==--
Where is the DWH database located? (Local, Remote) [Local]:
Setup can configure the local postgresql server automatically for the DWH to run. This may conflict with existing applications.
Would you like Setup to automatically configure postgresql and create DWH database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
Where is the Engine database located? (Local, Remote) [Local]:
Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.
Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
--== OVIRT ENGINE CONFIGURATION ==--
Engine admin password:
Confirm engine admin password:
[WARNING] Password is weak: it is too short
Use weak password? (Yes, No) [No]: Yes
Application mode (Virt, Gluster, Both) [Both]:
--== STORAGE CONFIGURATION ==--
Default SAN wipe after delete (Yes, No) [No]:
--== PKI CONFIGURATION ==--
Organization name for certificate [Test]:
--== APACHE CONFIGURATION ==--
Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.
Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:
Setup can configure apache to use SSL using a certificate issued from the internal CA.
Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
--== SYSTEM CONFIGURATION ==--
--== MISC CONFIGURATION ==--
Please choose Data Warehouse sampling scale:
(1) Basic
(2) Full
(1, 2)[1]:
--== END OF CONFIGURATION ==--
[ INFO ] Stage: Setup validation
[WARNING] Cannot validate host name settings, reason: resolved host does not match any of the local addresses
--== CONFIGURATION PREVIEW ==--
Application mode : both
Default SAN wipe after delete : False
Update Firewall : False
Host FQDN : b-ovirt-engine
Configure local Engine database : True
Set application as default page : True
Configure Apache SSL : True
Engine database secured connection : False
Engine database user name : engine
Engine database name : engine
Engine database host : localhost
Engine database port : 5432
Engine database host name validation : False
Engine installation : True
PKI organization : Test
Set up ovirt-provider-ovn : False
Configure WebSocket Proxy : True
DWH installation : True
DWH database host : localhost
DWH database port : 5432
Configure local DWH database : True
Configure Image I/O Proxy : True
Configure VMConsole Proxy : True
Please confirm installation settings (OK, Cancel) [OK]:
[ INFO ] Stage: Transaction setup
[ INFO ] Stopping engine service
<snip>
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully
[root@b-ovirt-engine ~]#
|
access to the GUI over HTTPS
If you can not log into the portal by displaying “The redirection URI for client is not registered” as below:
Try the following:
[root@b-ovirt-engine ~]# cd /etc/ovirt-engine/engine.conf.d/
[root@b-ovirt-engine engine.conf.d]#
[root@b-ovirt-engine engine.conf.d]# echo "SSO_CALLBACK_PREFIX_CHECK=false" > 99-sso.conf
[root@b-ovirt-engine engine.conf.d]# systemctl restart ovirt-engine
|
Reference
https://bugzilla.redhat.com/show_bug.cgi?id=1483544
[ set up ovirt-node ]
Prepare an ISO.
$ ls ISO_images/ovir*
ISO_images/ovirt-node-ng-installer-ovirt-4.2-2018032206.iso
|
I have crated a ovirt-node VM via virt-manager.
OS type : Linux, RedHat Linux 7
HDD : 60GB
[ add the ovirt-node via GUI ]
confirm status is UP
[ configure storage ]
prepare NFS server for storage.
create a LXC profile to run NFS
copy a profile
$ lxc profile show b-net
config:
security.nesting: "true"
security.privileged: "true"
description: ""
devices:
eth0:
name: eth0
nictype: bridged
parent: b-net
type: nic
name: b-net
used_by: []
$ lxc profile copy b-net b-net-nfs
$ echo -en "mount fstype=rpc_pipefs,\nmount fstype=nfsd," | lxc profile set b-net-nfs raw.apparmor –
$ lxc profile show b-net-nfs
config:
raw.apparmor: |-
mount fstype=rpc_pipefs,
mount fstype=nfsd,
security.nesting: "true"
security.privileged: "true"
description: ""
devices:
eth0:
name: eth0
nictype: bridged
parent: b-net
type: nic
name: b-net-nfs
used_by: []
|
set up NFS server.
$ lxc launch centos7 -p b-net-nfs b-nfs
Creating b-nfs
Starting b-nfs
$ lxc exec b-nfs bash
[root@b-nfs ~]#
[root@b-nfs ~]# yum install nfs-utils
[root@b-nfs ~]# systemctl daemon-reload
[root@b-nfs ~]# systemctl enable rpcbind.service
[root@b-nfs ~]# systemctl enable nfs-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
[root@b-nfs ~]# systemctl start rpcbind.service
[root@b-nfs ~]# systemctl start nfs-server.service
[root@b-nfs ~]# mkdir -p /exports/data
[root@b-nfs ~]# mkdir -p /exports/export
[root@b-nfs exports]# mkdir -p /exports/iso
[root@b-nfs ~]# cat /etc/exports
/exports/data *(rw)
/exports/export *(rw)
/exports/iso *(rw)
[root@b-nfs ~]# exportfs -r
[root@b-nfs ~]#
[root@b-nfs ~]# systemctl reload nfs-server
[root@b-nfs ~]#
[root@b-nfs ~]# systemctl reload nfs-server
[root@b-nfs ~]# grep 36 /etc/group
[root@b-nfs ~]# groupadd kvm -g 36
[root@b-nfs ~]# useradd vdsm -u 36 -g 36
[root@b-nfs ~]# chown -R 36:36 /exports/data
[root@b-nfs ~]# chown -R 36:36 /exports/export
[root@b-nfs ~]# chown -R 36:36 /exports/iso
[root@b-nfs ~]# chmod 0755 /exports/data
[root@b-nfs ~]# chmod 0755 /exports/export
[root@b-nfs ~]# chmod 0755 /exports/iso
[root@b-nfs ~]#
|
Storage -> Domain -> Add domain ( domain function Data )
domain function ISO
domain function export
After adding three domain functions, Data, ISO, EXPORT.
[ create a virtual machine ]
upload an ISO form the ovirt-engine.
[root@b-ovirt-engine ~]# engine-iso-uploader list
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort):
ISO Storage Domain Name | ISO Domain Status
NFS-data-iso | ok
[root@b-ovirt-engine ~]#
[root@b-ovirt-engine ~]# engine-iso-uploader upload -i NFS-data-iso CentOS-7-x86_64-Minimal-1708.iso
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort):
Uploading, please wait...
INFO: Start uploading CentOS-7-x86_64-Minimal-1708.iso
Uploading: [########################################] 100%
INFO: CentOS-7-x86_64-Minimal-1708.iso uploaded successfully
[root@b-ovirt-engine ~]#
|
You will see an ISO via GUI.
Create a virtual machine.
Compute -> Virtual Machines -> New
add virtual HDD
Attach an ISO and change boot orders so that the VM can boot from the ISO.
on the ovirt node, execute virsh with read-only mode.
[root@localhost ~]# virsh -r
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh > list --all
Id Name State
----------------------------------------------------
7 v01 running
virsh >
|