
#冲刺创作新星#OLVM使用教程 原创
OLVM简介
简介
Oracle Linux Virtualization Manager是一个服务器虚拟化管理平台,可以轻松地部署以配置,监视和管理具有企业级性能和Oracle支持的基于Oracle Linux内核的虚拟机(KVM)环境。
Oracle Linux 7安装
以下将在Cloudlab上进行安装
新增虚拟机
输入名称等信息,并选择映像文件
配置CPU:2 core,Mem:8GB,Storage:50GB
系统安装
开机后,选择“Install Oracle Linux 7.9”,Enter进行安装
语言选择,默认:US English,单击Next
时区选择“Asis/Hong Kong”,最小化安装
配置网络信息
设置Host name
设置root密码
安装完成,单击Reboot
OLVM安装
配置yum仓库
Enable the ol7_latest yum repository
Install the Oracle Linux Virtualization Manager Release 4.3.6 package
Verify that the required repositories are enabled
The following repositories must be enabled:
• ol7_latest
• ol7_optional_latest
• ol7_kvm-utils
• ol7_gluster6
• ol7_UEKR5
• ovirt-4.3
• ovirt-4.3-extra
disable the 4.2 repositories using yum
Install the Manager
Configuring the Engine
当前使用默认配置
SSO Setup
配置FQDNS
Logging in
因主机未配置正确FQDN,默认配置使用主机hostname
https://ol7-olvm/ovirt-engine
Username:admin
Password:P@ss0lvm
本机windows添加hosts记录:“172.16.94.29 ol7-olvm”
Reset User Password
SSH to the Oracle Linux Virtualization Manager
KVM Host安装
参照Oracle Linux 7安装,进行Oracle Linux 7 minimal安装
磁盘分区如下:
配置yum仓库
Enable the ol7_latest yum repository
Install the Oracle Linux Virtualization Manager Release 4.3.6 package
Verify that the required repositories are enabled
The following repositories must be enabled:
• ol7_latest
• ol7_optional_latest
• ol7_kvm-utils
• ol7_gluster6
• ol7_UEKR5
• ovirt-4.3
• ovirt-4.3-extra
disable the 4.2 repositories using yum
(Optional) Open the Cockpit port
OLVM配置
添加KVM Host
输入相关信息进行添加
添加完成,InstallFailed,查看日志提示主机不支持虚拟化
解决方案:
开启ol7-kvm01 CPU虚拟化
安装完成,状态为“Up”
Power Management配置
iDRAC配置
启用LAN上的IPMI
新建Read only角色用户
Username:fence_ovirt
Password:OviP@ss
LAN权限级别为:管理员
Fence agent配置
Kdump integration配置
KVM Host修改/etc/kdump.conf配置,增加以下两行
Restart kdump service
Storage Domains
创建iSCSI卷
在openfiler服务器中创建,详看openfiler文档
添加Storage Domains
输入相关信息,发现Target – login – Add
添加成功,状态为Active
上传ISO文件到Data Domain
在engine主机上,检查ovirt-image-proxy服务状态
在engine主机上,将Engine证书作为证书的可信证书
在KVM主机上,检查ovirt-image-proxy服务状态
登录Administration Portal
选择ISO镜像文件,并填写相关信息,点击“Test Connection”
点击“Ok”,进行上传
Logical Network
创建Virtual Machine Network
点击“Network”-“Networks”-“New”
输入网络名称
分配VM Network给KVM Host
点击“Compute”-“Hosts”,点击KVM Host “ol7-kvm01”
打开“Network Interfaces”,点击“Setup Host Networks”
目前并无多余Interfaces可供分配,需在Cloudlab添加网卡给kvm host
Cloudlab为kvm host添加网卡
将VM Net拉到对应新增的网卡的Logical Networks中
配置完成
创建Virtual Machine
管控独立KVM Host
当遇到使用local disk的kvm host需要加入到olvm时可采用新建存储为local类型的Data Center
Preparing Local Storage for KVM Hosts
Create New Data Center
“Compute”-“Data Centers”-“New”
Configure Cluster
Configure Host
Create New Domain
“Compute”-“Storage”-“Domains” -“New Domain”
Check the status
Upgrade KVM Host
“Compute”-“Hosts”-“Installation”-“Upgrade”
Reboot host after upgrade
Upgrade Completed
Install Guest Agent
https://support.oracle.com/knowledge/Oracle%20Linux%20and%20Virtualization/2560639_1.html
Guest VMs显示需安装guest agent并启动
For Oracle Linux 7 guest VMs
For Microsoft Windows VMs
Upload the ovirt-tools-setup.iso to a storage domain in the olvmadm
“Compute”-“Virtual Machines”-“Change CD”
Select ovirt-tools-setup.iso
Install ovirt-guest-tools-setup.exe
Install Oracle Windows VirtIO Drivers
将winvirtio.iso上传到Storage Domains
参照guest agent安装进行。
Backup OLVM Engine
Create a script called /root/tools/scripts/backup_housekeep.sh with the following below contents
Make /root/tools/scripts/backup_housekeep.sh executable
Edit crontab file
Add the below contents
The daily backups will be automatically taken at 12:00 am every day at /var/lib/ovirt-engine-backup/
Regenerate All Certificates in OLVM
put the environment into global maintenance mode.
Manager:
KVM Host:
Stop all guest VMs and put KVM hosts into maintenance mode.
Create new CA with following command :
Make sure you have latest Setup packages i.e ovirt-engine-setup ovirt-engine-setup-plugin-websocket-proxy
Run engine-setup, this will recreate all the remaining certs of the manager.
Restart services
In OLVM GUI, Enroll certificate for KVM host.
Compute -> Hosts -> Select the host -> Installation -> Enroll Certificate
