ovirt安裝及使用
一、ovirt engine安裝
系統環境centos7,連接外網
1,升級系統
[root@localhost ~]# yum -y update
2,安裝oVirt project數據源
要安裝oVirt4.0 就安裝 ovirt-release40.rpm;要安裝oVirt 3.6 就安裝 ovirt-release36.rpm,以此類推:
如:
# yum install http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm
# yum install http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm
此處安裝最新4.0版本:
[root@localhost ~]# yum installhttp://plain.resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm
3,安裝ovirt engine
[root@localhost ~]# yum -y install ovirt-engine [root@localhost ~]# engine-setup ===========根據提示選擇================ Configure Engine on this host (Yes, No) [Yes]: yes Configure Image I/O Proxy on this host? (Yes, No) [Yes]: yes Configure WebSocket Proxy on this host (Yes, No) [Yes]: yes Please note: Data Warehouse is required for the engine. If you choose tonot configure it on this host, you have to configure it on a remote host, andthen configure the engine on this host so that it can access the database ofthe remote Data Warehouse host. Configure Data Warehouse on thishost (Yes, No) [Yes]: yes Configure VM Console Proxy on this host (Yes, No) [Yes]: Host fully qualified DNS name of thisserver [localhost.localdomain]: test2.ovirt.com Engine admin password: Confirm engine admin password: --== CONFIGURATION PREVIEW ==-- Application mode : both Default SAN wipe after delete : False Firewall manager : firewalld Update Firewall : True Host FQDN : test2.ovirt.com Engine database secured connection : False Engine database host : localhost Engine database user name : engine Engine database name : engine Engine database port : 5432 Engine database host name validation : False DWH database secured connection : False DWH database host : localhost DWH database user name : ovirt_engine_history DWH database name : ovirt_engine_history DWH database port : 5432 DWH database host name validation : False Engine installation : True PKI organization : ovirt.com Configure local Engine database : True Set application as default page : True Configure Apache SSL : True DWH installation : True Configure local DWH database : True Engine Host FQDN : test2.ovirt.com Configure Image I/O Proxy : True Configure VMConsole Proxy : True Configure WebSocket Proxy : True Please confirm installation settings (OK, Cancel) [OK]: ok [ INFO ] Execution of setupcompleted successfully ===================安裝成功======================= 注意:域名需能夠解析。添加host文件 [root@localhost ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.224 test2.ovirt.com
4,登錄
注意4.0默認全域名限制,必須通過域名登錄。第一次登錄異常慢,暫不知何故。
二、安裝主機節點
環境centos7,最小安裝,連接外網。
1,安裝ovirt-release
通過yum安裝ovirt-release4.0,與ovirt-engine對應。
[root@localhost ~]# yum localinstall http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl disable firewalld.service #永久關閉
注意:
1)確認主機節點支持虛擬化:
[root@localhost ~]# cat /proc/cpuinfo |grepvmx #沒回顯說明不支持虛擬化
如果使用虛擬機做測試請開啓嵌套虛擬化:
http://dingtongxue1990.blog.51cto.com/4959501/1851965
2)若客戶端沒有安裝tar命令,請安裝。
# yum install tar
三、ovirt使用
登錄到ovirt-engine管理中心
1,添加數據中心
2,配置集羣
3,添加node主機
4,添加存儲域
這裏使用nfs,添加存儲域時先要配置一臺nfs服務器。nfs服務器IP:192.168.0.4,共享目錄/home/iso220和/home/nfs220。
nfs服務器配置請查看:http://dingtongxue1990.blog.51cto.com/4959501/1852222
1)添加數據域
2)添加iso域
5,新增虛擬機
1)上傳鏡像
先登錄到ovirt engine,將操作系統鏡像上傳到nfs服務器上。
[root@localhost home]# ls #這是在192.168.0.224上,即ovirtengine服務器上。 CentOS-7-x86_64-DVD-1511.iso test [root@localhost home]# engine-iso-uploaderupload -i iso_test CentOS-7-x86_64-DVD-1511.iso Please provide the REST API password forthe admin@internal oVirt Engine user (CTRL+D to abort): Uploading, please wait... Uploading:[########################################] 100% INFO: CentOS-7-x86_64-DVD-1511.iso uploadedsuccessfully #格式:engine-iso-uploaderupload -i local-iso-share [file1] [file2] .... [fileN]。
2)新建虛擬機
在高級選項中可以選擇配置cpu、內存等其他配置。
3)運行虛擬機
使用virt-viewer打開下載文件,virt-viewer下載地址:https://virt-manager.org/download/
四、附錄
ovirt官方安裝文檔:
http://www.ovirt.org/documentation/quickstart/quickstart-guide/#install-hosts
中文翻譯版:
http://blog.csdn.net/cmzsteven/article/details/51627341
virt-viewer下載地址
https://virt-manager.org/download/
注意項:
1)ovirt engine使用域名限制,需保證域名能夠解析
2)安裝node主機時要配置防火牆策略或關閉防火牆
3)node主機需支持虛擬化,使用虛擬機測試請開啓嵌套虛擬化
http://dingtongxue1990.blog.51cto.com/4959501/1851965