天天看点

centos7.3 安装ovirt-engine4.0 版本

官网:

安装指南:http://www.ovirt.org/documentation/install-guide/Installation_Guide/

下载地址:http://www.ovirt.org/download/

管理端安装:http://www.ovirt.org/documentation/install-guide/chap-Installing_oVirt/

node安装 :http://www.ovirt.org/documentation/install-guide/chap-oVirt_Nodes/

管理端:

node 节点iso:

安装node 节点时,强烈建议自动分区

管理端yum仓库:

[ovirt-4.1]

name=Latest oVirt 4.1 Release

#baseurl=http://resources.ovirt.org/pub/ovirt-4.1/rpm/el$releasever/

mirrorlist=http://resources.ovirt.org/pub/yum-repo/mirrorlist-ovirt-4.1-el$releasever

enabled=1

skip_if_unavailable=1

gpgcheck=1

[aliyun]

name=aliyun

baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/

gpgcheck=0

[fr2.rpmfind.net]

name=fr2.rpmfind.net

baseurl=ftp://fr2.rpmfind.net/linux/centos/7.3.1611/updates/x86_64/

首先管理端:

yum update

reboot

yum install -y ovirt-engine (官网比较慢)

engine-setup 环境包配置以及安装包的下载

执行命令:engine-setup (这里密码我设置为admin 用户名也一样)

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-20170624083328-opfj3g.log

          Version: otopi-1.6.2 (otopi-1.6.2-1.el7.centos)

[ INFO  ] Stage: Environment packages setup

[ INFO  ] Yum Downloading: ovirt-4.1/7 (0%)

[ INFO  ] Yum Downloading: sac-gdeploy/x86_64 (0%)

[ INFO  ] Stage: Programs detection

[ INFO  ] Stage: Environment customization

          --== PRODUCT OPTIONS ==--

          Configure Engine on this host (Yes, No) [Yes]: 

          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 [ovirt-engine.gewala.net]: 

[WARNING] Failed to resolve ovirt-engine.gewala.net using DNS, it can be resolved only locally

          Setup can automatically configure the firewall on this system.

          Note: automatic configuration of the firewall may overwrite current settings.

          Do you want Setup to configure the firewall? (Yes, No) [Yes]: 

[ INFO  ] firewalld will be configured as firewall manager.

          --== 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 [gewala.net]: 

          --== 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 ==--

          Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [No]: yes

          Local ISO domain path [/var/lib/exports/iso]: 

          Please provide the ACL for the Local ISO domain.

          See the exports(5) manpage for the format.

          Examples:

          - To allow access for host1, host2 and host3, input: host1(rw) host2(rw) host3(rw)

          - To allow access to the entire Internet, input: *(rw)

          For more information, see: http://www.ovirt.org/Troubleshooting_NFS_Storage_Issues

          Local ISO domain ACL: *(rw)    

          Local ISO domain name [ISO_DOMAIN]: 

          --== MISC CONFIGURATION ==--

          Please choose Data Warehouse sampling scale:

          (1) Basic

          (2) Full

          (1, 2)[1]: 

          --== END OF CONFIGURATION ==--

[ INFO  ] Stage: Setup validation

          --== CONFIGURATION PREVIEW ==--

          Application mode                        : both

          Default SAN wipe after delete           : False

          Firewall manager                        : firewalld

          Update Firewall                         : True

          Host FQDN                               : ovirt-engine.gewala.net

          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

          NFS setup                               : True

          PKI organization                        : gewala.net

          NFS export ACL                          : *(rw)*

          NFS mount point                         : /var/lib/exports/iso

          DWH installation                        : True

          DWH database secured connection         : False

          DWH database host                       : localhost

          DWH database user name                  : ovirt_engine_history

          DWH database name                       : ovirt_engine_history

          DWH database port                       : 5432

          DWH database host name validation       : False

          Configure local DWH database            : True

          Configure Image I/O Proxy               : True

          Configure VMConsole Proxy               : True

          Configure WebSocket Proxy               : True

          Please confirm installation settings (OK, Cancel) [OK]: 

[ INFO  ] Stage: Transaction setup

[ INFO  ] Stopping engine service

[ INFO  ] Stopping ovirt-fence-kdump-listener service

[ INFO  ] Stopping dwh service

[ INFO  ] Stopping Image I/O Proxy service

[ INFO  ] Stopping vmconsole-proxy service

[ INFO  ] Stopping websocket-proxy service

[ INFO  ] Stage: Misc configuration

[ INFO  ] Stage: Package installation

[ INFO  ] Upgrading CA

[ INFO  ] Initializing PostgreSQL

[ INFO  ] Creating PostgreSQL 'engine' database

[ INFO  ] Configuring PostgreSQL

[ INFO  ] Creating PostgreSQL 'ovirt_engine_history' database

[ INFO  ] Creating CA

[ INFO  ] Creating/refreshing Engine database schema

[ INFO  ] Creating/refreshing DWH database schema

[ INFO  ] Configuring Image I/O Proxy

[ INFO  ] Setting up ovirt-vmconsole proxy helper PKI artifacts

[ INFO  ] Setting up ovirt-vmconsole SSH PKI artifacts

[ INFO  ] Configuring WebSocket Proxy

[ INFO  ] Creating/refreshing Engine 'internal' domain database schema

[ INFO  ] Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'

[ INFO  ] Stage: Transaction commit

[ INFO  ] Stage: Closing up

[ INFO  ] Starting engine service

[ INFO  ] Restarting nfs services

[ INFO  ] Starting dwh service

[ INFO  ] Restarting ovirt-vmconsole proxy service

          --== SUMMARY ==--

[ INFO  ] Restarting httpd

          Please use the user 'admin@internal' and password specified in order to login

          Web access is enabled at:

              http://ovirt-engine.gewala.net:80/ovirt-engine

              https://ovirt-engine.gewala.net:443/ovirt-engine

          Internal CA 92:33:70:05:A2:83:0D:81:01:CE:39:24:59:21:7E:AE:00:B3:89:63

          SSH fingerprint: 54:64:7f:ab:6f:cb:dd:26:9a:26:07:92:5c:7b:50:dd

[ ERROR ] Could not refresh NFS exports (1: [u'exportfs: /etc/exports.d/ovirt-engine-iso-domain.exports:1: syntax error: bad option list'])  (这里我nfs 配置错了,之后进入/etc/exports.d/ovirt-engine-iso-domain.exports 修改一下即可)

          --== END OF SUMMARY ==--

[ INFO  ] Stage: Clean up

          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20170624083328-opfj3g.log

[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20170624084825-setup.conf'

[ INFO  ] Stage: Pre-termination

[ INFO  ] Stage: Termination

[ INFO  ] Execution of setup completed successfully

 NFS 修改

cat /etc/exports.d/ovirt-engine-iso-domain.exports 

/var/lib/exports/iso*(rw)

systemctl restart nfs-server.service

[root@ovirt-engine yum.repos.d]# showmount -e 192.168.3.176

Export list for 192.168.3.176:

/var/lib/exports/iso *

检查一下 共享目录权限 的拥有人与拥有组是否有权限,并且是否都属于 vdsm kvm 这两个用户与组的

否则会挂载不上的

<a href="https://s5.51cto.com/wyfs02/M02/9B/00/wKioL1lc7U2SEddrAAAxmdAOFjM261.png" target="_blank"></a>

之后打开主页

ovirt-engine.gewala.net (自己的主机名即可)自己设置的用户与密码:admin/admin

node端:

我用自己的系统最小化安装,然后使用安装包做的node端

yum install vdsm vdsm-cli -y

如果启动失败vdsm服务,需要:

systemctl restart vdsmd  failed

vdsm-tool configure 

systemctl stop sanlock

systemctl stop libvirtd

h端:主机名解析 /etc/hosts

启动相关服务有:

systemctl restart vdsmd

systemctl restart vdsm-network

systemctl restart vdsm-network-init.service

systemctl restart momd

systemctl restart momd-vdsm

安装node dashboard图形管理端:

yum install cockpit-ovirt-dashboard.noarch -y

如果要进Node 里面使用virsh 操作的话使用以下操作

useradd user

echo "password" | passwd --stdin user

 saslpasswd2 -a libvirt user

virsh 登录的时候输入user 用户名与密码即可

本文转自 a120518129 51CTO博客,原文链接:http://blog.51cto.com/silencezone/1741237,如需转载请自行联系原作者