oVirt4.2开源虚拟化安装笔记1-oVirt-Engine安装过程

本文转载:https://blog.csdn.net/lpwmm/article/details/80015276

1.安装CentOS 7.4.1708

1.1系统安装

从mirrors.163.com下载系统镜像  http://mirrors.163.com/centos/7.4.1708/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso



设置时区,最小化安装,禁用KDUMP,配置网络连接,最后Begin Installation




设置一下ROOT密码,不需要创建其他用户



装好CentOS后就可以用SSH远程访问管理了,这样复制粘贴命令什么的更方便,初次进入系统还需要做以下设置:

1.2关闭SELinux

这一步不一定是必须的,但是根据先前的经验,先关掉没啥坏处,以免后面遇到啥幺蛾子再去折腾

  1. #vi /etc/selinux/conf  
  2. 相应内容改为  
  3. SELINUX=diabled  
#vi /etc/selinux/conf
相应内容改为
SELINUX=diabled

1.3关闭系统防火墙

  1. #systemctl disable firewalld  
#systemctl disable firewalld

1.4设置hostname

这一步其实应该在安装过程中就做的,当时觉得没啥用就没设置,后来配置host节点的时候发现还必须要通过用Engine所在服务器的FQDN(Fully Qualified Domain Name)来进行设置通信,这里补上手工设置的命令

  1. # hostnamectl set-hostname engine.lian  
# hostnamectl set-hostname engine.lian
  1. # hostnamectl        //查看当前主机名称和系统信息  
  2.    Static hostname: engine.lian  
  3.          Icon name: computer-vm  
  4.            Chassis: vm  
  5.         Machine ID: 6342271252c84699a6ad86673d56b290  
  6.            Boot ID: d1acf719009a47c8916e0d36840df71f  
  7.     Virtualization: vmware  
  8.   Operating System: CentOS Linux 7 (Core)  
  9.        CPE OS Name: cpe:/o:centos:centos:7  
  10.             Kernel: Linux 3.10.0-693.el7.x86_64  
  11.       Architecture: x86-64  
# hostnamectl        //查看当前主机名称和系统信息
   Static hostname: engine.lian
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 6342271252c84699a6ad86673d56b290
           Boot ID: d1acf719009a47c8916e0d36840df71f
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.el7.x86_64
      Architecture: x86-64

1.5重启一下系统

  1. #reboot  
#reboot

2.安装oVirt-Engine管理后台

2.1修改yum源

官方的yum源速度不太靠谱,这里使用网易的镜像源

  1. # cd /etc/yum.repo.d  
  2. # mkdir bak  
  3. # mv *.repo bak/  
  4. # curl -o CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo  
  5. # yum clean all  
# cd /etc/yum.repo.d




mkdir bak

mv *.repo bak/

curl -o CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

yum clean all

2.2开始正式安装之前,需要先将ovirt官方的源添加到系统yum源库中

# yum install -y http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm

yum -y update

update这一步很重要,否则接下来将无法查询到ovirt-engine的包

2.3安装ovirt-engine

  1. # yum install -y ovirt-engine  
# yum install -y ovirt-engine

这一步会安装大量的依赖关系用到的包大约351个,所以需要的时间比较长,特别是最后一个ovirt-engine-*的包需要从官方的源下载,速度比较慢,反正我这边基本上是在100K以内徘徊,耐心等待就行,安装过程大概用了差不多半个小时左右

下载完成后在安装期间遇到错误:

  1. GPG key retrieval failed: [Errno 12] Timeout on https://raw.githubusercontent.com/CentOS-Storage-SIG/centos-release-storage-common/master/RPM-GPG-KEY-CentOS-SIG-Storage: (28, ’Connection timed out after 30001 milliseconds’)  
GPG key retrieval failed: [Errno 12] Timeout on https://raw.githubusercontent.com/CentOS-Storage-SIG/centos-release-storage-common/master/RPM-GPG-KEY-CentOS-SIG-Storage: (28, 'Connection timed out after 30001 milliseconds')

这是GPG key校验的时候超时了,设置不做校验即可

  1. # vi /etc/yum.repo.d/ovirt-4.2.repo  
  2. # vi /etc/yum.repo.d/ovirt-4.2-dependencies.repo  
  3. 修改内容中所有的的gpgcheck=0  
# vi /etc/yum.repo.d/ovirt-4.2.repo

vi /etc/yum.repo.d/ovirt-4.2-dependencies.repo

修改内容中所有的的gpgcheck=0

3.配置ovirt-engine

ovirt-engine安装完成后需要运行首次配置向导

[root@localhost yum.repos.d]# 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-20180420195341-6bsbdg.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]: 回车(OVN:Open Virtual Network,配置虚拟网络)
          Configure Image I/O Proxy on this host (Yes, No) [Yes]: 回车(Image I/O Proxy可以支持向oVirt平台中上传虚拟机的磁盘镜像)
          Configure WebSocket Proxy on this host (Yes, No) [Yes]: 回车(WebSocket Proxy用来支持使用noVNC远程登录虚拟机图形界面管理)
         
          * 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]: 回车(支持访问虚拟机的串口console通信)
         
          –== PACKAGES ==–
         
[ INFO  ] Checking for product updates…
[ INFO  ] No product updates found
         
          –== NETWORK CONFIGURATION ==–
         
          Host fully qualified DNS name of this server [localhost.localdomain]: 回车(使用默认hostname就行,反正是准备用IP地址访问无所谓)
[WARNING] Failed to resolve localhost.localdomain 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.
          NOTICE: iptables is deprecated and will be removed in future releases
          Do you want Setup to configure the firewall? (Yes, No) [Yes]: no回车(因为之前已经把防火墙服务给关掉了,所以就不用再配置防火墙的具体设置了)
         
          –== DATABASE CONFIGURATION ==–
         
          Where is the DWH database located? (Local, Remote) [Local]: 回车(DWH:Data WareHouse使用本地数据库)
          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]: 回车(自动配置PostGreSQL数据库)
          Where is the Engine database located? (Local, Remote) [Local]: 回车(Engine用到的数据库位于本机)
          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]: 回车(使用安装程序自动创建Engine数据库)
         
          –== OVIRT ENGINE CONFIGURATION ==–
         
          Engine admin password: 输入后台管理员admin的密码回车
          Confirm engine admin password: 再输入一遍密码回车
          Application mode (Virt, Gluster, Both) [Both]: 回车
          Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]: 回车(使用默认的admin@internal内部管理员账号)
         
          –== STORAGE CONFIGURATION ==–
         
          Default SAN wipe after delete (Yes, No) [No]: 回车(yes的话在删除虚拟机的虚拟磁盘后会擦除存储设备上的对应块)
         
          –== PKI CONFIGURATION ==–
         
          Organization name for certificate [localdomain]: 回车
         
          –== 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]: 回车(使用apache作为web服务器)
          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]: 回车(自动配置CA证书)
         
          –== 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
[WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended.
          Do you want Setup to continue, with amount of memory less than recommended? (Yes, No) [No]: yes回车(因为是在虚拟机上装的,内存有点小,才会提示这个)
         
          –== CONFIGURATION PREVIEW ==–
         
          Application mode                        : both
          Default SAN wipe after delete           : False
          Update Firewall                         : False
          Host FQDN                               : localhost.localdomain
          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                        : localdomain
          Set up ovirt-provider-ovn               : True
          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
[ 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  ] Stage: Misc configuration
[ INFO  ] Upgrading CA
[ INFO  ] Initializing PostgreSQL
[ INFO  ] Creating PostgreSQL ‘engine’ database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating PostgreSQL ‘ovirt_engine_history’ database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating CA
[ 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 database schema
[ INFO  ] Creating/refreshing Engine ‘internal’ domain database schema
[ INFO  ] Adding default OVN provider to database
[ INFO  ] Adding OVN provider secret to database
[ INFO  ] Setting a password for internal user admin
[ 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  ] Starting dwh service
[ INFO  ] Restarting ovirt-vmconsole proxy service
         
          –== SUMMARY ==–
         
[ INFO  ] Restarting httpd
          In order to configure firewalld, copy the files from
              /etc/ovirt-engine/firewalld to /etc/firewalld/services
              and execute the following commands:
              firewall-cmd –permanent –add-service ovirt-postgres
              firewall-cmd –permanent –add-service ovirt-https
              firewall-cmd –permanent –add-service ovn-central-firewall-service
              firewall-cmd –permanent –add-service ovirt-fence-kdump-listener
              firewall-cmd –permanent –add-service ovirt-imageio-proxy
              firewall-cmd –permanent –add-service ovirt-websocket-proxy
              firewall-cmd –permanent –add-service ovirt-http
              firewall-cmd –permanent –add-service ovirt-vmconsole-proxy
              firewall-cmd –permanent –add-service ovirt-provider-ovn
              firewall-cmd –reload
          The following network ports should be opened:
              tcp:2222
              tcp:35357
              tcp:443
              tcp:5432
              tcp:54323
              tcp:6100
              tcp:6641
              tcp:6642
              tcp:80
              tcp:9696
              udp:7410
          An example of the required configuration for iptables can be found at:
              /etc/ovirt-engine/iptables.example
          Please use the user ‘admin@internal’ and password specified in order to login
          Web access is enabled at:
              http://localhost.localdomain:80/ovirt-engine
              https://localhost.localdomain:443/ovirt-engine
          Internal CA 95:CB:1A:EA:A7:CC:48:A3:14:8F:79:8D:BC:07:4F:98:D7:EB:B4:19
          SSH fingerprint: SHA256:ltDYySFckI6bPO0OV+yzErG3YVqgA8zBnHZkEK3bWRs
[WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended.
         
          –== END OF SUMMARY ==–
         
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20180420195341-6bsbdg.log
[ INFO  ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20180420195951-setup.conf’
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

[ INFO  ] Execution of setup completed successfully

至此,oVirt-Engine安装完毕,在另一台电脑上直接访问服务器的ip地址,会提示The redirection URI for client is not registered


解决方法:增加一个配置文件如下

  1. # vi /etc/ovirt-engine/engine.conf.d/99-sso.conf  
  2. 写入内容:  
# vi /etc/ovirt-engine/engine.conf.d/99-sso.conf 
写入内容:
SSO_CALLBACK_PREFIX_CHECK=false

重启ovirt-engine服务

  1. # service ovirt-engine restart  
# service ovirt-engine restart

再次访问,错误提示消失,登录管理门户后,看到新版的oVirt管理后台,界面变动还是比较大的,更洋气了的感觉





  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
要在Ubuntu上安装oVirt,可以按照以下步骤进行操作: 1. 首先,确保您的Ubuntu系统已经更新到最新版本。您可以使用以下命令进行系统更新: ``` sudo apt update sudo apt upgrade ``` 2. 安装oVirt引擎管理节点。执行以下命令来安装所需的软件包: ``` sudo apt install ovirt-engine ``` 3. 安装oVirt引擎数据库。默认情况下,oVirt使用PostgreSQL数据库。您可以使用以下命令来安装: ``` sudo apt install ovirt-engine-extension-aaa-ldap-setup ovirt-engine-extension-aaa-ldap ovirt-engine-dwh-setup ovirt-engine-sdk-python ovirt-engine-tools-backup ovirt-engine-webadmin-portal ovirt-engine-yubikey-setup ovirt-guest-agent-common ovirt-host-deploy ovirt-imageio-common ovirt-imageio-daemon ovirt-imageio-proxy ovirt-provider-ovn-common ovirt-provider-ovn-driver ovirt-provider-ovn-hosted-engine-ha ovirt-provider-ovn-provider ovirt-provider-ovn-vdsm ovirt-release-master ``` 4. 安装oVirt引擎虚拟化节点。执行以下命令进行安装: ``` sudo apt install ovirt-hosted-engine-ha ``` 5. 配置oVirt引擎。执行以下命令开始配置过程: ``` sudo engine-setup ``` 6. 按照引导程序的指示完成oVirt引擎的配置。您需要提供必要的信息,例如管理员密码、数据库配置等。 7. 完成配置后,您可以通过Web浏览器访问oVirt引擎的管理控制台。 请注意,以上步骤提供了安装oVirt引擎的基本过程。根据您的特定需求和环境,可能还需要进行其他配置和调整。建议您参考官方文档或oVirt社区以获取更详细和具体的信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值