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

目录

  • 目录
  • 前言
  • Install RHEV
  • 创建Data CenterClusterHost
  • 创建存储
  • 创建虚拟机

前言

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

Install RHEV

Step1:更新系统

yum update -y

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

yum  install  -y rhevm  rhevm-reports  rhevm-dwh

Step3:配置RHEV

[[email protected] ~]# 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域并赋予权限。

[[email protected] ~]# 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用户是否成功加入域

[[email protected] ~]# engine-manage-domains list
Domain: example.com
    User name: [email protected].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:获取虚拟机镜像

[[email protected] ~]# 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.iso”

100%[======================================>] 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

[[email protected] ~]# engine-iso-uploader list
Please provide the REST API password for the [email protected] oVirt Engine user (CTRL+D to abort):
ISO Storage Domain Name   | Datacenter                | ISO Domain Status
iso2                      | DC1                       | active

[[email protected] ~]# engine-iso-uploader -i iso2 upload rhel-server-7.1-x86_64-boot.iso
Please provide the REST API password for the [email protected] 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

时间: 2024-08-08 05:53:14

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

openstack创建虚拟机的步骤

图片来自互联网. 虚拟机启动过程如下: 1.界面或命令行通过RESTful API向keystone获取认证信息.2.keystone通过用户请求认证信息,并生成auth-token返回给对应的认证请求.3.界面或命令行通过RESTful API向nova-api发送一个boot instance的请求(携带auth-token).4.nova-api接受请求后向keystone发送认证请求,查看token是否为有效用户和token.5.keystone验证token是否有效,如有效则返回有效的

虚拟化系列之二--创建虚拟机

本文 参考地址 从Xen Host Kernel复制出一个半虚拟化的guest 1. img和swap 创建一个50G的用于根文件系统的 img # dd if=/dev/zero of=/data/xen/xen1.img bs=1M seek=51200 count=0 格式化成ext3 # mkfs -t ext3 /data/xen/xen1.img 创建一个2G的用于swap交换的img # dd if=/dev/zero of=/data/xen/xen1..swap bs=1M s

初识KVM之1——虚拟化介绍及创建KVM虚拟机

一.基础知识 CPU的工作机制 随着云计算的兴起,虚拟化作为云计算的组成部分也火了一把,但虚拟化并不是什么新技术,早在上世纪70年代虚拟化技术就已经出现.传统的CPU由4个环组成,分为:环0--环3,环0只与内核通信,执行特权指令,而环3工作在用户空间,环1.环2预留,每当用户空间发起特权请求时,会立即激活内核空间,此时用户与内核空间的切换称为软中断,用户空间的所有特权指令都必须通过系统调用的方式来完成 全虚拟化.半虚拟化和CPU辅助虚拟化 虚拟化按照实现方式分为:全虚拟化.半虚拟化和CPU辅助

VMware 虚拟化技术 创建虚拟机

原文地址:https://www.linuxidc.com/Linux/2017-03/141972.htm 云最成熟的架构是IaaS(Infrastructure as a Service),其中用到的技术有xen,kvm,lxd等,VMware虚拟化技术也是其中的一种. 为什么要虚拟化技术呢?目前在众多大规模互联网公司和游戏公司大都采用xen,kvm等虚拟化技术,使用这些虚拟化技术的好处是当服务器宕机时,运维人员在做维护时只需要将在虚拟机上运行的服务切换到另一台物理机上.而如果不使用虚拟化技

Hyper-V虚拟化测试22使用SMB共享创建虚拟机

要做到虚拟机的快速实时迁移,我们就需要把虚拟机磁盘存放在共享路径下,例如共享存储,但是在Windows  Server 2012下Hyper-V 3.0,微软支持把虚拟机存放在SMB共享中,之前的博客中介绍了SMB共享存储服务配置,博客地址: http://winteragain.blog.51cto.com/1436066/1614179 下面我们基于SMB共享创建虚拟机,先配置下Hyper-V,点击Hyper-V设置 设定虚拟磁盘的共享路径 设置虚拟机的共享路径,主要用于存储虚拟机配置文件

在Openstack控制节点上使用nova命令创建虚拟机(详细图文过程)

首先,我们需要了解到使用nova命令行创建一个虚拟机,需要如下的信息:glanceID.flavorID.net-id.security-groupsID.availability-zone(指定的母机}.keypairname1.查看glance使用命令:glance image-list 列出节点上所有的image,选择需要的镜像, 我们这里选择:93449941-fba1-436e-a4f2-74a5c1250ad1 2.查看flavor使用命令:nova flavor-list 来列出节

虚拟机工作站创建虚拟机并安装Linux教程

前言: 今天开始学习一下Linux,之前早就想看,但是一直没时间,最近把其他知识整理完了,终于有时间来看一下Linux了. 本节只是安装虚拟机工作站,虚拟机,和Linux操作系统的过程,详细的记录了我安装的过程,以便自己以后查阅,同样给大家提供参考. 一丶什么是Linux: Linux是什么?不知道的同学自行去百度,出于人道主义,博主这里就帮你们搬到了这里,具体的我不想花时间去介绍它的历史,网上一大堆! 二丶为什么要学Linux: 在Web应用中,除了一些小网站或者一些对性能不要求的网站还在使用

VMware创建虚拟机教程详解及问题解决

关于VMware Workstation Pro虚拟机创建教程,本教程主要详细描述使用软件VMware Workstation Pro建虚拟系统过程中步骤详解,以及个人安装时所出现部分问题的解决方案. VMware Workstation 虚拟机是采用虚拟化技术的模拟器 一.操作环境描述 硬件:联想小新v4000笔记本 软件:VMware Workstation Pro 12版本 Centos 6.5.iso镜像 二.创建步骤 1.点击创建虚拟机,进入新建虚拟机创建向导 1) 典型:默认配置安装

搭建红帽虚拟化平台RHEV——主机host的安装

搭建红帽虚拟化平台RHEV之主机host安装:如何给予rhel安装host主机,详情见下文: // 操作系统:RHEV-H FOR Red Hat Enterprise Linux Host(v.6.5 x86_64) 安装3.3版本的rhev必须安装6.5以上版本的操作系统软件 #安装官网下载的RHEL6.5.x86_64 DVD ISO:rhel-server-6.5-x86_64-dvd.iso Group install:Virtualization Host #关闭防火墙IPTABLE