热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

教你简单玩好ovirt

注:本文全部为本人翻译的官方文档,谢绝转载一、oVrit简介oVirt提供了一个完整的数据中心虚拟化解决方案可以一起工作的项目集合。包括如下几大功能:1、oVirt-engineoVir

注:本文全部为本人翻译的官方文档,谢绝转载

一、oVrit简介

oVirt 提供了一个完整的数据中心虚拟化解决方案可以一起工作的项目集合。

包括如下几大功能:

1、oVirt-engine

oVirt Engine allows you to configure your network, storage, nodes and images. 

oVirt Engine also provides a command line interface tool (ovirt-engine-cli) and 

a RESTful API (ovirt-engine-api), including a Python wrapper (ovirt-engine-python-sdk) 

which allow developers to integrate management functionality into shell scripts of third party applications.

虚拟机允许你配置你的网络,存储,节点还有镜像,虚拟机也提供了命令行工具ovirt-engine-cli和很实用的API(ovirt-engine-api),

包含了python包装器,这个wrapper可以允许开发者整合功能到第三方的shell脚本中管理

2、VDSM

The Virtual Desktop and Server Management daemon runs on oVirt managed nodes, 

and allows oVirt to remotely deploy, start, stop and monitor virtual machines running on the node.

这个虚拟桌面和服务管理守护进程运行在oVirt的管理节点上,允许oVirt远程的部署,开始,停止monitor端的机器

3、oVirt-node

oVirt Node is just enough operating system to run virtual machines. 

It is also possible to convert a standard Linux distribution into a node 

which can be managed by ovirt-engine by installing VDSM and other dependencies.

虚拟节点仅是一个运行在虚拟机上的操作系统,他也可以把一个标准发行版的linux转换成一个节点,这个节点可以通过 ovirt-engine管理,通过VDSM和其他依赖安装。

4、dwh and reports

The reports and data warehouse components for ovirt-engine are optional, 

and are packaged and developed separately.

对于ovirt-engine,报告和数据仓库的这个组件是可选择的,并且是分别分装和开发的。

二、yum下载ovirt-engine

1、下载官方源并且更新所有的包

yum localinstall http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm
yum update -y

2、下载ovirt机安装

yum -y install ovirt-engineyum install -y ovirt-engine-setup-plugin-allinone

三、开始安装

engine-setup

The installer will take you through a series of interactive questions as listed in the following example. If you do not enter a value when prompted, the installer uses the default settings which are stated in [ ] brackets.

安装程序将要带你在下面的例子中通过一系列交互式的问题,如果你不键入一个值,安装程序将要使用[]内的作为默认的值。

Example 1: oVirt Engine installatio

 [ INFO  ] Stage: Initializing [ INFO  ] Stage: Environment setup         Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf']         Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140310163840.log         Version: otopi-1.2.0_rc2 (otopi-1.2.0-0.7.rc2.fc19) [ INFO  ] Stage: Environment packages setup [ INFO  ] Stage: Programs detection [ INFO  ] Stage: Environment setup [ INFO  ] Stage: Environment customization                 --== PRODUCT OPTIONS ==--         --== PACKAGES ==--         [ INFO  ] Checking for product updates... [ INFO  ] No product updates found             --== NETWORK CONFIGURATION ==--                 Host fully qualified DNS name of this server [server.name]: example.ovirt.org         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 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 ==--                 Application mode (Both, Virt, Gluster) [Both]:          Default storage type: (NFS, FC, ISCSI, POSIXFS) [NFS]:          Engine admin password:          Confirm engine admin password:                  --== PKI CONFIGURATION ==--                 Organization name for certificate [ovirt.org]:                  --== APACHE CONFIGURATION ==--                 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]:          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]:                  --== SYSTEM CONFIGURATION ==--                 Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:          Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]:          Local ISO domain path [/var/lib/exports/iso-20140310143916]:          Local ISO domain ACL - note that the default will restrict access to example.ovirt.org only, for security reasons [example.ovirt.org(rw)]:          Local ISO domain name [ISO_DOMAIN]:                  --== MISC CONFIGURATION ==--            --== END OF CONFIGURATION ==-

Important points to note:

几个重要点:

  • The default ports 80 and 443 must be available to access the manager on HTTP and HTTPS respectively.

默认是http和http是上使用80和443端口

  • If you elect to configure an NFS share it will be exported from the machine on which the manager is being installed.

如果你选择配置了NFS共享,他将从正在被安装的管理机中输出(不太明确)

  • The storage type that you select will be used to create a data center and cluster. You will then be able to attach storage to these from the Web Administration Portal.

你选择的存储类型将被用于创建一个数据中心和集群,你将要能够在web管理界面后续加上他们。

  • The default ACL for the ISO_DOMAIN NFS export is allowing access to the current machine only. You need to provide read/write access to any host that will need to attach to this domain.

对于ISO_DOMAIN NFS默认的ACL默认仅仅是可以进入当前的机器的,你需要提供读和写的权限允许能够访问在这个区域其他主机。

You are then presented with a summary of the configurations you have selected. Type yes to accept them.

你将被呈上一些配置供你选择,输入yes接受他们。

Example 2: Confirm Engine installation settings

[ INFO  ] Stage: Setup validation                          --== CONFIGURATION PREVIEW ==--                 Engine database name                    : engine         Engine database secured connection      : False         Engine database host                    : localhost         Engine database user name               : engine         Engine database host name validation    : False         Engine database port                    : 5432         NFS setup                               : True         PKI organization                        : ovirt.org         Application mode                        : both         Firewall manager                        : firewalld         Update Firewall                         : True         Configure WebSocket Proxy               : True         Host FQDN                               : example.ovirt.org         NFS export ACL                          : 0.0.0.0/0.0.0.0(rw)         NFS mount point                         : /var/lib/exports/iso-20140310143916         Datacenter storage type                 : nfs         Configure local Engine database         : True         Set application as default page         : True         Configure Apache SSL                    : True         Please confirm installation settings (OK, Cancel) [OK]:


The installation commences. The following message displays, indicating that the installation was successful.

安装开始,下列信息将显示,表明安装时成功了!

Example 3: Successful installation

 [ INFO  ] Stage: Transaction setup [ INFO  ] Stopping engine service [ INFO  ] Stopping websocket-proxy service [ INFO  ] Stage: Misc configuration [ INFO  ] Stage: Package installation [ INFO  ] Stage: Misc configuration [ INFO  ] Creating PostgreSQL 'engine' database [ INFO  ] Configuring PostgreSQL [ INFO  ] Creating Engine database schema [ INFO  ] Creating CA [ INFO  ] Configuring WebSocket Proxy [ 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                 --== SUMMARY ==--                 SSH fingerprint:          Internal CA:          Web access is enabled at:             http://example.ovirt.org:80/ovirt-engine             https://example.ovirt.org:443/ovirt-engine         Please use the user "admin" and password specified in order to login into oVirt Engine                 --== END OF SUMMARY ==--         [ INFO  ] Starting engine service [ INFO  ] Restarting httpd [ INFO  ] Restarting nfs services [ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140310163837-setup.conf' [ INFO  ] Stage: Clean up         Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140310163604.log [ INFO  ] Stage: Pre-termination [ INFO  ] Stage: Termination [ INFO  ] Execution of setup completed successfully      **** Installation completed successfully ******


四、在浏览器中打开https://10.0.0.111,进入web管理界面

注:要设置安全认证的,这里是测试,就不在设置

wKiom1Zj1nXwqRCVAAHRD9X8ys4600.png

1、Configure oVirt

Now that you have logged in to the administration portal, configure your oVirt environment by defining the data center, host cluster, networks and storage. Even though this guide makes use of the default resources configured during installation, if you are setting up a oVirt environment with completely new components, you should perform the configuration procedure in the sequence given here.

现在你已经登录了管理入口,通过定义的数据中心,集群网络和存储配置你的oVirt 环境。虽然这个导向是在默认安装过程中资源配置可用,如果你正在布置一个完整的新oVirt环境,你应该所给的顺序中执行配置步骤。

2、Configure Data Centers

A data center is a logical entity that defines the set of physical and logical resources used in a managed virtual environment. Think of it as a container which houses clusters of hosts, virtual machines, storage and networks.

数据中心是物理实体集合的逻辑上实体和逻辑资源,被用在一个可管理的虚拟环境,包含了集群,主机,虚拟机,存储和网络。

By default, oVirt creates a data center at installation. Its type is configured from the installation script. To access it, navigate to the Tree pane, click Expand All, and select the Default data center. On the Data Centers tab, the Default data center displays.

通常情况下,oVirl创建了一个数据中心装置。他的通过安装脚本进行配置。验证通过,就可以在界面上以web界面树状的方格的方式使用,点击Expand All,并且选择默认数据中心,在这个数据中心标签上,默认的数据中心内容将被显示。

wKioL1Zj4d-DPOdgAAC87v2HhYQ642.pngThe Default data center is used for this document, however if you wish to create a new data center see the oVirt Administration Guide.

默认的数据中心被用在这个目录下,想学习如果创建一个新的数据中心请看http://www.ovirt.org/OVirt_Administration_Guide

3、Configure Networks

A cluster is a set of physical hosts that are treated as a resource pool for a set of virtual machines. Hosts in a cluster share the same network infrastructure, the same storage and the same type of CPU. They constitute a migration domain within which virtual machines can be moved from host to host. By default, oVirt creates a cluster at installation. To access it, navigate to the Tree pane, click Expand All and select the Default cluster. On the Clusters tab, the Default cluster displays.

一个集群用一系列的是物理主机,用系列的虚拟机来解决资源缺乏,在集群中,这些主机在想用相同的网络,相同的存储,和相同类型的CPU,这就构成了一个虚拟机可以在迁移域内从主机到另一个主机。默认的情况,oVirt会创建安装环境一个集群。验证通过,就可以在界面上以web界面树状的方格的方式使用,点击Expand All,并且选择默认集群,在这个集群标签上,默认的集群内容将被显示。

wKioL1Zj5B_irbnEAADS-gmDTfc446.png

4、Configure Networks

At installation, oVirt defines a Management network for the default data center. This network is used for communication between the manager and the host. New logical networks - for example for guest data, storage or display - can be added to enhance network speed and performance. All networks used by hosts and clusters must be added to data center they belong to.

To access the Management network, click on the Clusters tab and select the default cluster. Click the Logical Networks tab in the Details pane. The ovirtmgmt network displays.

在这个安装环境中,oVirt定义了为数据中心的一个管理网络,这个网络被用于在管理机和虚拟机值键通信,新的逻辑性的网络,举个例子,客户机的数据存储或者显示,能够被添加以至于加速网络和性能。所有的网络都将被虚拟机和集群都将被添加到数据中心。

在网络管理上验证通过,点击集群标签并选择默认的集群,点击就可以在界面上以web界面树状的方格的方式使用,ovirtmgm网络络内容将被显示。

wKioL1Zj5kqz21NYAADNdq6SmkA771.png5、Configure Hosts

You have already installed your oVirt Node and Fedora hosts, but before they can be used, they have to be added to the Engine. The oVirt Node is specifically designed for the oVirt platform, therefore it only needs a simple click of approval. Conversely, Fedora is a general purpose operating system, therefore reprogramming it as a host requires additional configuration.

你已经安装了你的oVirt节点和Fedora 主机,但是这你能使用他们之间,你需要添加一个引擎,这个oVirt节点是被在oVirt平台上特殊设计过的,你仅仅需要很简单的点击。关于Fedora这里不在有任何翻译(这句话本人写的,不是官方哦)

To set up a oVirt Node host

1)On the Tree pane, click Expand All and select Hosts under the Default cluster. On the Hosts tab, select the name of your newly installed hypervisor.

在这个页面上,点击Expand All,选择默认集群下的主机,在主机标签上,选择你新安装的名字。

2) Click the Approve button. The Edit and Approve Host dialog displays. Accept the defaults or make changes as necessary, then click OK.

点击批准按钮,编辑并且批准主机对话显示,接受默认的必要的改变,选择ok

3) The host status will change from Non Operational to Up.

主机状态将改变从Non Operational 成 Up.

6、Configure Storage

After configuring your logical networks, you need to add storage to your data center.

配置完你的网络,你需要添加一个存储到你的数据中心了。

oVirt uses a centralized shared storage system for virtual machine disk images and snapshots. Storage can be implemented using Network File System (NFS), Internet Small Computer System Interface (iSCSI) or Fibre Channel Protocol (FCP). Storage definition, type and function, are encapsulated in a logical entity called a Storage Domain. Multiple storage domains are supported.

oVirt为虚拟机的磁盘镜像使用了一个集中化的共享存储和快照功能,存储可以被部署为NFS,iSCSI或者FCP。存储的定义,类型功能是被密封在一个被叫做存储域的实体中,多种存储域都是支持的。

For this guide you will use two types of storage domains. The first is an NFS share for ISO images of installation media. You have already created this ISO domain during the oVirt Engine installation.

下面的导向,我们将使用两种存储于,第一个针对于ISO的迹象和安装媒体的是nfs,你已经创建了ISO域在oVirt Engine安装过程中。

The second storage domain will be used to hold virtual machine disk images. For this domain, you need at least one of the supported storage types. You have already set a default storage type during installation as described in Install oVirt Engine. Ensure that you use the same type when creating your data domain.

第二种存储于将要被用于包含虚拟机的磁盘镜像,针对于这个域,你需要至少支持存储类型的一种,你液晶设置一个默认的存储类型在安装过程中,被描述为Install oVirt Engine,确认当你创建数据域的时候,你已经用了相同类型存储域。

Select your next step by checking the storage type you should use:

1)Navigate to the Tree pane and click the Expand All button. Under System, click Default. On the results list, the Default data center displays.

选择Expand All按钮,在系统之下,选择default,在清单下,默认的数据将被显示。

2)On the results list, the Storage Type column displays the type you should add.

在这个结果清单下,你应该添加显示的存储类型

3Now that you have verified the storage type, create the storage domain - see one of:

现在你已经确认了存储类型,创建一个存储域吧,请看


    • Create an NFS Data Domain.

    • Create an iSCSI Data Domain.

    • Create an FCP Data Domain.

其余内容太多了,详情请看官方文档,如有问题或者官方文档疑问问题,请在下面留言

本文出自 “思想决定高度” 博客,谢绝转载!


推荐阅读
author-avatar
龙蛇虫
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有