红帽虚拟化RHEV3.2创建虚拟机(图文Step by Step)

本文涉及的产品
云原生数据库 PolarDB MySQL 版,通用型 2核4GB 50GB
云原生数据库 PolarDB PostgreSQL 版,标准版 2核4GB 50GB
简介: 目录目录前言Install RHEV创建Data CenterClusterHost创建存储创建虚拟机前言RHEV3.2的Web管理界面有了很大的改进,更加的简单和便捷,还可以使用中文浏览。

目录

前言

RHEV3.2的Web管理界面有了很大的改进,更加的简单和便捷,还可以使用中文浏览。

Install RHEV

Step1:更新系统

yum update -y

Step2:安装RHEV并将其report功能也安装上

yum  install  -y rhevm  rhevm-reports  rhevm-dwh

Step3:配置RHEV

[root@rhevm ~]# engine-setup 
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-dwh.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-packaging-rhevm-reports.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160604231558-xbilsi.log
          Version: otopi-1.3.0 (otopi-1.3.0-2.el6ev)
[ 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 Data Warehouse on this host (Yes, No) [Yes]:          #是否在本机配置数据仓库
          Configure Reports on this host (Yes, No) [Yes]:                 #是否在本机配置报告功能
          Configure WebSocket Proxy on this host (Yes, No) [Yes]:         #是否在本机配置Web代理服务

          --== PACKAGES ==--

[ INFO  ] Checking for product updates...
[ INFO  ] No product updates found

          --== ALL IN ONE CONFIGURATION ==--


          --== NETWORK CONFIGURATION ==--

          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]: no               #需要配置防火墙吗
          Host fully qualified DNS name of this server [rhevm.pod2.example.com]:         #指定主机的FQDN

          --== DATABASE CONFIGURATION ==--

          Where is the Reports database located? (Local, Remote) [Local]:                      #在哪里安装Report功能的数据库
          Setup can configure the local postgresql server automatically for the Reports to run. This may conflict with existing applications.
          Would you like Setup to automatically configure postgresql and create Reports database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:                           #手动还是自动配置postgresql数据库
          Where is the DWH database located? (Local, Remote) [Local]:                          #在哪里安装DWH数据库
          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]:                       #在哪里安装RHEV 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]: 

          --== OVIRT ENGINE CONFIGURATION ==--

          Engine admin password:                                #数据RHEV admin的密码
          Confirm engine admin password: 
[WARNING] Password is weak: it is based on a dictionary word
          Use weak password? (Yes, No) [No]: yes
          Application mode (Virt, Gluster, Both) [Both]: 

          --== PKI CONFIGURATION ==--

          Organization name for certificate [pod2.example.com]: pod2.example.com     #颁发证书的组织名,这个要保证准确

          --== 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]:              #是否将RHEV Web界面设置为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]: 

          --== SYSTEM CONFIGURATION ==--

          Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]:      //将ISO域的共享配置为NFS
          Local ISO domain path [/var/lib/exports/iso]: 
          Local ISO domain ACL - note that the default will restrict access to rhevm.pod2.example.com only, for security reasons [rhevm.pod2.example.com(rw)]: 
          Local ISO domain name [ISO_DOMAIN]: iso2

          --== MISC CONFIGURATION ==--

          Reports power users password:                    #Report功能Web界面的密码
          Confirm Reports power users password: 
[WARNING] Passwords do not match
          Reports power users password: 
          Confirm Reports power users password: 
[WARNING] Password is weak: it is based on a dictionary word
          Use weak password? (Yes, No) [No]: yes
          Would you like transactions from the Red Hat Access Plugin sent from the RHEV Manager to be brokered through a proxy server? (Yes, No) [No]: 

          --== END OF CONFIGURATION ==--

[ INFO  ] Stage: Setup validation
[WARNING] Less than 16384MB of memory is available

          --== CONFIGURATION PREVIEW ==--

          Application mode                        : both
          Update Firewall                         : False
          Host FQDN                               : rhevm.pod2.example.com
          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
          Engine installation                     : True
          NFS setup                               : True
          PKI organization                        : pod2.example.com
          NFS mount point                         : /var/lib/exports/iso
          NFS export ACL                          : rhevm.pod2.example.com(rw)
          Configure local Engine database         : True
          Set application as default page         : True
          Configure Apache SSL                    : True
          DWH installation                        : True
          DWH database name                       : ovirt_engine_history
          DWH database secured connection         : False
          DWH database host                       : localhost
          DWH database user name                  : ovirt_engine_history
          DWH database host name validation       : False
          DWH database port                       : 5432
          Configure local DWH database            : True
          Reports installation                    : True
          Reports database name                   : ovirt_engine_reports
          Reports database secured connection     : False
          Reports database host                   : localhost
          Reports database user name              : ovirt_engine_reports
          Reports database host name validation   : False
          Reports database port                   : 5432
          Configure local Reports database        : True
          Engine Host FQDN                        : rhevm.pod2.example.com
          Configure WebSocket Proxy               : True

          Please confirm installation settings (OK, Cancel) [OK]: 
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping dwh service
[ INFO  ] Stopping reports service
[ INFO  ] Stopping engine service
[ INFO  ] Stopping ovirt-fence-kdump-listener service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Initializing PostgreSQL
[ INFO  ] Creating PostgreSQL 'engine' database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating PostgreSQL 'ovirt_engine_history' database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating PostgreSQL 'ovirt_engine_reports' database
[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating/refreshing Engine database schema
[ INFO  ] Creating CA
[ INFO  ] Creating/refreshing DWH database schema
[ INFO  ] Deploying Jasper
[ INFO  ] Importing data into Jasper
[ INFO  ] Configuring Jasper Java resources
[ INFO  ] Configuring Jasper Database resources
[ INFO  ] Customizing Jasper
[ INFO  ] Customizing Jasper metadata
[ INFO  ] Customizing Jasper Pro Parts
[ 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
[ INFO  ] Restarting nfs services

          --== SUMMARY ==--

[WARNING] Less than 16384MB of memory is available
          SSH fingerprint: A3:61:93:18:AF:88:80:8F:BE:90:57:AB:60:F1:ED:BD
          Internal CA 1A:33:97:83:9B:2E:44:FD:52:D4:BF:84:F5:C5:75:17:36:B4:26:98
          Web access is enabled at:
              http://rhevm.pod2.example.com:80/ovirt-engine
              https://rhevm.pod2.example.com:443/ovirt-engine
          Please use the user "admin" and password specified in order to login
          The following network ports should be opened:
              tcp:111
              tcp:2049
              tcp:32803
              tcp:443
              tcp:5432
              tcp:6100
              tcp:662
              tcp:80
              tcp:875
              tcp:892
              udp:111
              udp:32769
              udp:662
              udp:7410
              udp:875
              udp:892
          An example of the required configuration for iptables can be found at:
              /etc/ovirt-engine/iptables.example

          --== END OF SUMMARY ==--

[ INFO  ] Starting engine service
[ INFO  ] Restarting httpd
[ INFO  ] Starting dwh service
[ INFO  ] Starting reports service
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160604231558-xbilsi.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160604233528-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Execution of setup completed successfully

Step5:将rhevadmin用户加入到example.com域并赋予权限。

[root@rhevm ~]# engine-manage-domains add --domain=example.com --provider=IPA --user=rhevadmin --add-permissions 
Enter password:
Successfully added domain example.com. oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).
Manage Domains completed successfully

Step6:重启ovirt-engine服务使配置生效

[root@rhevm ~]#/etc/init.d/ovirt-engine restart

Step7:验证rhevadmin用户是否成功加入域

[root@rhevm ~]# engine-manage-domains list
Domain: example.com
    User name: rhevadmin@EXAMPLE.COM
Manage Domains completed successfully

创建Data Center、Cluster、Host

Step1:Get the CPU Type

    1. Login Manager Potal from rhevadmin
    1. 将H端加入到Host中
    1. Get the CUPtype:Intel Nehalem Family用于之后创建cluster时使用

Step2:Create DataCenter、Cluster and Host

  • DataCenters: (Add Data Centers)New –> OK
    这里写图片描述
    这里写图片描述

  • Cluster: (Add Clusters) New –> CPU Type:Intel Nehalem Family
    这里写图片描述
    这里写图片描述

  • Hosts: New –> Data Center –> Host Cluster –> Address:RHEVHAddress –> UserName:root –> Password:RHEV-HPassword
    这里写图片描述
    这里写图片描述

创建存储

Step1:新建Shared Directory

[root@rhevm ~]# mkdir -p /exports/testdate
[root@rhevm ~]# mkdir /exports/testexport
[root@rhevm ~]# chown 36:36 /exports/test*     #必须给你36权限,RHEVM才能够访问

Step2:配置NFS共享
vim /etc/exports

/var/lib/exports/iso    rhevm.pod2.example.com(rw)
/var/lib/exports/iso    172.25.2.0/255.255.0.0(rw,sync,no_root_squash)
/var/lib/exports/iso    172.25.2.0/255.255.255.0(rw,sync,no_root_squash)
/exports/testdata       172.25.0.0/255.255.0.0(rw,sync,no_root_squash)
/exports/testdata       172.25.0.0/255.255.255.0(rw,sync,no_root_squash)
/exports/testexport     172.25.0.0/255.255.0.0(rw,sync,no_root_squash)
/exports/testexport     172.25.0.0/255.255.255.0(rw,sync,no_root_squash)
/exports/rhevisos       172.25.0.0/255.255.255.0(rw,sync,no_root_squash)
/exports/rhevisos       172.25.0.0/255.255.0.0(rw,sync,no_root_squash)

Step3:重启使共享生效

[root@rhevm ~]# exportfs -r
[root@rhevm ~]# service nfs restart

Step4:在RHEVM Web界面新建Data Storage
Storage –> New Domain –> Data/NFS
这里写图片描述

Step5:新建ISO Storage
Storage –> New Domain –> ISO/NFS or iso2 –> Data Center -> Attach
这里写图片描述

创建虚拟机

Step1:获取虚拟机镜像

[root@rhevm ~]# wget http://classroom.example.com/materials/rhel-server-7.1-x86_64-boot.iso
--2016-06-05 02:43:21--  http://classroom.example.com/materials/rhel-server-7.1-x86_64-boot.iso
Resolving classroom.example.com... 172.25.254.254
Connecting to classroom.example.com|172.25.254.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 358612992 (342M) [application/octet-stream]
Saving to: “rhel-server-7.1-x86_64-boot.iso100%[======================================>] 358,612,992 90.5M/s   in 3.7s    

2016-06-05 02:43:25 (91.5 MB/s) - “rhel-server-7.1-x86_64-boot.iso” saved [358612992/358612992]

Step2:上传虚拟机镜像到RHEVM

[root@rhevm ~]# 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   | Datacenter                | ISO Domain Status
iso2                      | DC1                       | active

[root@rhevm ~]# engine-iso-uploader -i iso2 upload rhel-server-7.1-x86_64-boot.iso
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 
Uploading, please wait...
INFO: Start uploading rhel-server-7.1-x86_64-boot.iso 
INFO: rhel-server-7.1-x86_64-boot.iso uploaded successfully

Step3:配置虚拟机的MAC Pool

[root@rhevm ~]# engine-config -s MacPoolRanges=52:54:00:00:02:10-52:54:00:00:02:FF
[root@rhevm ~]# /etc/init.d/ovirt-engine restart
Stopping oVirt Engine:                                     [  OK  ]
Starting oVirt Engine:                                     [  OK  ]

Step4:创建虚拟机
Virtual Machines –> New VM
这里写图片描述

Step5:创建虚拟机的虚拟磁盘
Virtual Machines –> VMName –> Disks
这里写图片描述

Step6:创建虚拟机的虚拟网卡
Virtual Machines –> VMName –> Network Interfaces
这里写图片描述

Step7:安装虚拟机操作系统
这里写图片描述

点击小电视开启VM –> 在grub2界面按tab建 –> 输入ks=http://classroom.example.com/materisals/small-rhev.cfg –> 回车
这里写图片描述

Step8:login the VM and check the MAC

Step9:新建快照
Virtual Machines –> VMName –> Snapshots –> Create –> OK

Step10:新建模板
Virtual Machines –> stopVM –> right chick the VM and Make Template –> OK

Step11:新建Pool
Pool –> New –> 3 –> OK

相关文章
|
1月前
|
存储 SQL 数据库
虚拟化数据恢复—Vmware虚拟机误还原快照的数据恢复案例
虚拟化数据恢复环境: 一台虚拟机从物理机迁移到ESXI虚拟化平台,迁移完成后做了一个快照。虚拟机上运行了一个SQL Server数据库,记录了数年的数据。 ESXI虚拟化平台上有数十台虚拟机,EXSI虚拟化平台连接了一台EVA存储,所有的虚拟机都存放在EVA存储上。 虚拟化故障: 工组人员误操作将数年前迁移完成后做的快照还原了,也就意味着虚拟机状态还原到数年前,近几年数据都被删除了。 还原快照相当于删除数据,意味着部分存储空间会被释放。为了不让这部分释放的空间被重用,需要将连接到这台存储的所有虚拟机都关掉,需要将不能长时间宕机的虚拟机迁移到别的EXSI虚拟化平台上。
106 50
|
1月前
|
存储 持续交付 虚拟化
|
2月前
|
存储 运维 虚拟化
虚拟化数据恢复——Hyper-V虚拟化故障导致虚拟机文件丢失的数据恢复案例
在Windows Server上部署的Hyper-V虚拟化环境中,因存储中虚拟机数据文件丢失导致服务瘫痪。北亚企安数据恢复工程师通过物理检测、操作系统及文件系统检测,确定为人为格式化造成,并通过镜像硬盘、重组RAID、分析并恢复文件索引项等步骤,成功恢复数据,最终在新Hyper-V环境中验证并迁移所有虚拟机,确保用户业务恢复正常运行。
|
3月前
|
存储 SQL 数据挖掘
虚拟化数据恢复—VMware虚拟机vmdk文件被误删除的数据恢复案例
虚拟化数据恢复环境: 某品牌服务器(部署VMware EXSI虚拟机)+同品牌存储(存放虚拟机文件)。 虚拟化故障: 意外断电导致服务器上某台虚拟机无法正常启动。查看虚拟机配置文件发现这台故障虚拟机除了磁盘文件以外其他配置文件全部丢失,xxx-flat.vmdk磁盘文件和xxx-000001-delta.vmdk快照文件还在。管理员联系VMware工程师寻求帮助。VMware工程师尝试新建一个虚拟机来解决故障,但发现ESXi存储空间不足。于是将故障虚拟机下的xxx-flat.vmdk磁盘文件删除,然后重建一个虚拟机并且分配固定大小的虚拟磁盘。
|
3月前
|
存储 SQL 数据挖掘
虚拟化数据恢复—EXSI虚拟机误还原快照的数据恢复案例
虚拟化技术原理是将硬件虚拟化供不同的虚拟机使用,一台物理机上可以有多台虚拟机。人为误操作或者物理机故障会导致上层虚拟机不可用,甚至虚拟机里的重要数据丢失。下面给大家分享一个vmware虚拟化误操作还原快照的数据恢复案例。 虚拟化数据恢复环境: 一台由物理机迁移到EXSI上面的虚拟机,迁移完成后做了一个快照。该虚拟机上运行SQL Server数据库,记录了几年的数据。 EXSI虚拟化平台上一共有数十台虚拟机,EXSI连接了一台EVA存储,所有的虚拟机(包括故障虚拟机)都放在EVA存储上。
|
3月前
|
存储 虚拟化
使用DiskGenius工具来实现物理机迁移虚拟机,实现虚拟化
【9月更文挑战第1天】使用 DiskGenius 工具可将物理机迁移到虚拟机,实现系统与数据的虚拟化。此过程包括:安装 DiskGenius 和准备虚拟化平台;备份物理机数据;使用 DiskGenius 备份磁盘;在虚拟化软件中创建新虚拟机并导入磁盘备份;配置及调整虚拟机设置;测试性能并优化资源分配。这有助于测试、开发及系统管理。
420 5
|
5月前
|
存储 安全 虚拟化
虚拟化数据恢复—虚拟机数据丢失导致Hyper-V服务瘫痪数据恢复
虚拟化数据恢复环境: 一台服务器上部署的Hyper-V虚拟化平台,虚拟机的硬盘文件和配置文件放在一台某品牌MD3200存储中。该存储中有一组由4块硬盘组建的raid5磁盘阵列,还有一块大容量硬盘存放虚拟机数据文件的备份。 虚拟化故障: MD3200存储中虚拟机数据文件丢失,导致Hyper-V服务瘫痪,虚拟机无法使用。
虚拟化数据恢复—虚拟机数据丢失导致Hyper-V服务瘫痪数据恢复
|
5月前
|
SQL 存储 数据库
虚拟化数据恢复—XenServer虚拟机磁盘文件丢失的数据恢复案例
虚拟化数据恢复环境: 某品牌R720服务器,4块STAT硬盘通过H710P阵列卡组建了一组raid10磁盘阵列。服务器上部署XenServer虚拟化平台,虚拟机安装Windows Server系统,作为Web服务器使用,运行SQL Server数据库。共有2个虚拟磁盘:数据盘+系统盘。 虚拟化故障: 机房断电导致XenServer虚拟化平台中一台VPS不可用,XenServer虚拟机磁盘文件丢失。
虚拟化数据恢复—XenServer虚拟机磁盘文件丢失的数据恢复案例
|
6月前
|
存储 IDE 开发工具
【读书笔记】 玩转虚拟机基于Vmware+Windows 虚拟化技术
【读书笔记】 玩转虚拟机基于Vmware+Windows 虚拟化技术
|
7月前
|
存储 SQL 数据库
虚拟化数据恢复—ESXI虚拟机误还原快照的数据恢复案例
虚拟化技术原理是将硬件虚拟化给不同的虚拟机使用,利用虚拟化技术可以在一台物理机上安装多台虚拟机。误操作或者物理机器出现故障都会导致虚拟机不可用,虚拟机中的数据丢失。 虚拟化数据恢复环境: 有一台虚拟机是由物理机迁移到ESXI上面的,迁移完成后为该虚拟机做了一个快照。虚拟机上运行了一个SQL Server数据库,记录了5年左右的数据。 该ESXI上共有二十几台虚拟机,EXSI连接一台某品牌EVA存储,所有的虚拟机(包括故障虚拟机)都存放在该EVA存储上。