服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

运维之家

 找回密码
 注册
搜索
查看: 5566|回复: 0

RHEVH企业虚拟化管理程序

[复制链接]
dirtysea 发表于 2011-9-19 09:28:13 | 显示全部楼层 |阅读模式
2010-10-19 12:13

rhev hypervisor 必须要安装在真实物理机上,不能装在虚拟机上
rhev hypervisor 会重新配置物理机硬盘,上面的原有数据会全部损坏,所以如果硬盘有数据要先备份下来
每台hypervisor的IP 和hostname 必须是唯一的
下所讲的安装方式是光盘安装,如果想使用usb或者pxe启动安装,请参见http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization_for_Servers/2.2/html/5.5-2.2_Hypervisor_Deployment_Guide/index.html
需要本机磁盘来安装hypervisor ,客户机的镜像文件可以安放在第三方存储上 如 SANS存储。
# rpm -q cdrecord   使用Linux自带
# yum install cdrecord
download the RHEV Hypervisor CD-ROM image from Red Hat Network,Insert a blank CD-ROM or DVD into your CD/DVD recorder drive。
# cdrecord dev=/dev/cdrw   /usr/share/rhev-hypervisor/rhev-hypervisor.iso
RHEV Hypervisor 使用 isomd5sum验证介质上数据完整性。所以如果启动安装hypervisor过程中报media error错误,需要重新刻录光盘。
安装之前的硬件**
**BIOS的中的虚拟化扩展已经开启
插入rhev hypervisor 启动盘 ,启动,输入 linux rescue **救援模式,使用下面的命令**cpu是否支持虚拟化
# grep -E 'svm|vmx' /proc/cpuinfo
如果有信息显示出来说明支持虚拟化
使用下面的命令验证 BIOS中是否开启 虚拟化扩展,加载kvm 模块
# lsmod | grep kvm
显示信息中包含 kvm_intel or kvm_amd   的话则说明硬件已经支持了虚拟化扩展,硬件就准备好了。
插入rhev hypervisor 启动盘,确定,**hypervisor 配置菜单
Red Hat Enterprise Virtualization Hypervisor release 5.5-2.2
Hypervisor Configuration Menu
1) Configure storage partitions    6) Configure the host for RHEV
2) Configure authentication        7) View logs
3) Set the hostname                8) Install locally and reboot
4) Networking setup                9) Support Menu
5) Register Host to RHN
Choose an option to configure:
如果之前安装过旧版rhev hypervisor 需要先写作,在support menu中选择uninstall。之后运行如下命令:
linux firstboot
硬盘分区:选择 Configure storage partitions **存储配置界面
Configure storage partitions
1) Configure
2) Review
3) Commit configuration
4) Return to the Hypervisor Configuration Menu
Choose an option:
选择configure 配置磁盘大小,可配置的磁盘包括f boot, swap, root, config, logging 和data 分区,分区以M为单位,如果输入 -1 作为大小则分配所有可用空间(此功能仅用于数据 分区),直接点击确定使用系统默认大小。填写大小的时候后面不要加 M 或者 MB ,只写数字就可。
启动分区包括 boot loader, kernel 和 initramfs(initramfs 代替了initrd),启动盘默认50M
swap交换分区 将内存中分页 加载到硬盘,默认swap分区时 内存总量的1.5倍 ,swap分区不可以被禁用,即使设置大小为0也不行,是swap的最小值是5M ,计算公式:
Recommended swap + (RAM * overcommit) = swap partition size
直接确定 ,使用自动自动分配的swap大小。
root分区包含 hypervisor的 core文件和 LiveOS 目录,root分区默认大小512M。被分成两个256M 分区,其中一个最为备份。
配置分区存储hypervisor的配置文件 ,配置分区默认最小5M
日志分区存储所有hypervisor日志文件。最小256M,默认2GB
数据分区存储core文件 kdump 文件,ISO 文件的临时存储。默认使用所有剩余分区。使用ISO Uploader 工具上传 ISO文件,文件在移动到共享ISO库之前暂存在这个分区。数据分区必须足够大,core文件根据ram的大小设定,kdump文件大小一般和ram文件相同。数据分区应该是1.5*ram大小 + 512M ,最小可是256M
**review菜单查看信息
The local disk will be repartitioned as follows:
================================================
           Physical Hard Disk: /dev/hda (1024 MB)
Disk Identifier: storage_serial_be_a8bb_1a222ce09dc6
          Boot partition size: 50 MB
          Swap partition size: 5 MB
Installation partition size: 256 * 2 MB
Configuration partition size: 5 MB
       Logging partition size: 5 MB
          Data partition size: 447 MB
选择Commit configuration 接受配置,受到下面的警告:
!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!
!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!
!!WARNING!!                                                    !!WARNING!!
!!WARNING!!                                                    !!WARNING!!
!!WARNING!!    If you proceed, all data on your selected storage !!WARNING!!
!!WARNING!!    device will be destroyed and your hard disk        !!WARNING!!
!!WARNING!!    will be irreversibly reconfigured.                 !!WARNING!!
!!WARNING!!                                                    !!WARNING!!
!!WARNING!!                                                    !!WARNING!!
!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!
!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!
Do you wish to proceed([Y]es or [N]o)?
直接点Y ,硬盘将被分区和格式化,完成后回到主菜单。
如果需要ssh远程反问的话,需要设置用户名和密码,主菜单--》 Configure authentication
SSH remote access is currently disabled
1) Set administrator password
2) Toggle SSH password authentication
3) Return to the Hypervisor Configuration Menu
Choose an option to configure:
Set administrator password
Set the system administrator's (root) password:
New UNIX password:
Changing password for user root.
passwd: all authentication tokens updated successfully.
storing to /config :
/etc/shadow File persisted
信息显示密码设置成功被存储到本地
配置ssh 验证
Administrator password--》 Toggle SSH password authentication
Enable SSH password authentication ([Y]es or [N]o)?
Y 输入ssh 密码, 成功后会显示下面信息
SSH remote access is currently enabled.
选择 Return to the Hypervisor Configuration Menu 继续hypervisor的安装。
Set the hostname 设置hypervisor主机名,输入 格式类似于 anyname.domain.example.com.
What is this Hypervisor's hostname? 输入名称后 确定
设置成功后会看到如下信息
The hostname is set.
然后回到主菜单
配置网络访问rhevM
选择 Networking setup 会列出主机中的已安装的网络设备,选择一个安装
Choose an interface or a configuration option:
不支持 无线 和 逻辑网络设备。
hypervisor有一个工具可以自动识别与rhevM通讯的 网卡是哪块
Help identify eth0 by blinking the lights for 10 seconds ([Y]es or [N]o)?
主机含有多个网络接口的话,Y自动选择,如果不需要,直接 N
不被支持的网络特性会显示出来。
Blinking is not supported by your network interface.
询问是否支持vlan
Include VLAN support ([Y]es, [N]o or [A]bort)?
输入Y ,输入vlan id ,不需要就选N
What is the VLAN ID for this device (a=abort)
IP地址设定,DHCP或者static
Enable IPv4 support ([S]tatic IP, [D]HCP, [N]o or [A]bort)?
**设置
Is this correct ([Y]es, [N]o or [A]bort)?
如果dhcp server没有指定dns的话,指定一个dns server
Enter the first DNS server (or press the Enter key to exit):
Enter the second DNS server (or press the Enter key to exit):
Is this correct ([Y]es, [N]o or [A]bort)?
NTP 时钟设置
ntp 保证主机与世界标准时间同步,ntp是非常重要的,时钟不一致的话,会影响 hypervisor间虚拟机的迁移。
Enter an NTP server:
输入ntp 服务器ip或者hostname , NTP server
输入完成后保存设置:Save And Return To Menu
如果网络设置正确会看到如下信息:

注册到rhn

Enter RHN account username:

Enter password for RHN account:
Enter profile name for this system (optional): 默认主机名
Enter HTTP proxy in host:port format, e.g. proxy.example.com:3128 (leave blank if
not required):

Enter URL of RHN Satellite (ie. https://satellite.example.com)
Enter location of satellite cert (https://satellite.example.com/pub/RHN-ORG-
TRUSTED-SSL-CERT):

Enter RHN account username:
Enter password for RHN account:
Enter profile name for this system (optional):
Enter HTTP proxy in host:port format, e.g. proxy.example.com:3128 (leave blank if
not required):

连接到rhev manager
进行此项之前请**是否已经配置后本地存储和网络,此项一旦配置,这些将不能再被更改,除非从头重新安装。
确保ip和用户名都是可解析的
Type                                  Format                                                   Example
IP address                      IP[:port]                                                   127.0.0.1:443
Host Name                       host.name.domain[:port]                      www.redhat.com:443

主菜单中选择 Configure the host for RHEV 选择 Configure the host for RHEV,出现如下信息
Enter the RHEV Manager's hostname or IP address.
Optionally: append a port after the hostname or IP address
For example, 10.0.0.1:443 or rhev.example.com:443

rhevM使用端口443作为默认端口,如果安装时已经指定了其他端口,则指定的端口将作为默认端口。如果指向正确会看到如下信息:
The RHEV Manager's address is set
The RHEV Manager's port is set.

网络控制台访问:Enter the NetConsole manager's hostname or IP address.
Optionally: append a port after the hostname or IP address
For example, 10.0.0.1:25285 or rhev.redhat.com:25285
If you are unsure, use the RHEV Manager's address, without a port.

指定netconsole 地址和端口,默认netconsole与 rhevM是同一台server ,端口也是在安装rhevM时指定的。如果指向正确,会看到如下信息
The NetConsole manager address is set.
The NetConsole manager port is set.

log文件
log文件用于分析安装过程中出现的错误,打开一个文件后 Shift+Page Up , Shift+Page Down实现翻页,log文件存放的路径
/var/log/ovirt.log 包含hypervisor的安装和配置过程
/var/log/messages 系统和core服务的一般信息
/var/log/secure 包含了验证和安全信息,包括登录失败信息
安装:
上面这些都设置好之后就可以将hypervisor安装到本地磁盘了
存储,网络,rhev manager 必须在安装hypervisor之前配置好。
1、在hypervisor 配置菜单选择 Install locally and reboot
2、This option exits the menu and requires a reboot.
Ensure local storage and networking is configured
correctly on the previous menu before continuing.
The current kernel boot parameters are
crashkernel=128M@16M elevator=deadline processor.max_cstate=1
Enter additional kernel boot parameters (press Enter to use the present arguments):

enter 继续
3、Do you wish to proceed ([Y]es or [N]o)? Y
之后就**的hypervisor的最后安装过程,完成之后会自动重启,之后在rhev manager 中就会看到多了一台host主机。
使用hypervisor
hypervisor启动之后会自动注册到rhev平台下, 在rhevM 的Hosts 选项卡下会看到 此hypervisor主机,但是想要使用此rhev,还要先经过 rhevM 的批准
批准RHEVM
1、登入rhevM 管理接口
2、点选 Hosts选项卡,列出hosts列表,点选hypervisor主机,看到 Pending Approval 状态,3、点击Approve,跳出 Edit and Approve 界面,详细设定后确定。
4、 Save ,Hosts选项卡状态变为installing,简短延迟后状态变为up




来源http://hi.baidu.com/loleafver/blog/item/d5c49d357b1d5a345ab5f5e1.html
llinlux 虚拟化之rhev http://hi.baidu.com/doughtymild/blog/item/ca89da82469690b16d811950.html

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|运维之家

GMT+8, 2024-4-16 16:41 , Processed in 0.096196 second(s), 14 queries .

Powered by Dirtysea

© 2008-2020 Dirtysea.com.

快速回复 返回顶部 返回列表