Install Oracle VM Manager on a separate machine(OVMM)

    版本為 15:30, 20 Sep 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    安裝 Oracle VM Manager (OVMM) 在個別的機器上。

    OVMM 主要組成的元件有:
    註: 以 OVMM 3.4 為例

    • Oracle VM Manager 主程式
    • Oracle WebLogic Server 12c
    • MySQL Enterprise Edition

    1.  下載 Oracle Linux & Oracle VM Manager ISO

    下載位址:http://edelivery.oracle.com/oraclevm

    • Oracle Linux 必須是 64-bit,此教學以 Oracle Linux 5.7 64-bit 為例。
    • Oracle VM Manager ISO 下載位置與 Oracle VM 相同。

    2. 以標準程序安裝 Oracle Linux

    • Disk 空間 20GB+,因為要儲存 Oracle VM Manager ISO 檔。
    • Memory 4GB+,否則無法安裝 OVMM。
    • 可選擇最小安裝。
    • 安裝時需停用 IPv6,因為 OVMM 不支援 IPv6。
    • 安裝時關閉 SELinux 與 Firewall。
      NOTE: 關於 OVMM 在 Firewall 的更詳細資訊,可以參閱官方手冊 Installation and Upgrade Guide for Release 3.3,章節 3.2.2.6 Firewall Configuration。

    注意:

    • OVMM 3.2.x 安裝空間至少需要 7800 MB。
    • OVMM 3.2.x 改用 MySQL 資料庫;3.1.x 以前版本使用 Oracle Express 資料庫。
    • OVMM 3.3.1/3.4 安裝成功。

    3. 安裝 OVMM

    事前準備

    硬體需求:

    • Memory 8GB (recommend)
    • CPU 1.83 GHz*1,64 bit
    • Disk free space // v3.3.x 版本
      • Swap Space 2.1GB
      • /u01 5.5 GB
      • /tmp 3 GB
      • /var 500 MB
      • /usr 500 MB

    軟體需求:

    • Oracle Linux 5.5+ 64-bit
    • Oracle Linux 6 64-bit
    • Oracle Linux 7 64-bit (for OVMM 3.4)

    需要的其它套件安裝:
    Oracle Linux 5.x)

     yum install zip unzip libaio perl
    
    開始安裝

    // 複製 OVMM ISO 到主機上。

    mkdir /mnt/iso
    mount -o loop Oracle_VM_Manager_3.2.8_V44601-01.iso /mnt/iso/
    

    // 安裝前初始化
    NOTE: 初始化程序包含建立 oracle 帳戶、設定 limits.conf,以及建立主程式目錄等。

    cd /mnt/iso
    sh createOracle.sh
    

    OVMM 3.3.x:

    [root@tycoddovmm iso]# sh createOracle.sh
    Adding group 'oinstall' with gid '54321' ...
    Adding group 'dba'
    Adding user 'oracle' with user id '54321', initial login group 'dba', supplementary group 'oinstall' and  home directory '/home/oracle' ...
    Changing ownership of '/home/oracle' to oracle:dba
    Creating user 'oracle' succeeded ...
    For security reasons, no default password was set for user 'oracle'. If you wish to login as the 'oracle' user, you will need to set a password for this account.
    Verifying user 'oracle' OS prerequisites for Oracle VM Manager ...
    oracle  soft    nofile          8192
    oracle  hard    nofile          65536
    oracle  soft    nproc           2048
    oracle  hard    nproc           16384
    oracle  soft    stack           10240
    oracle  hard    stack           32768
    oracle  soft    core            unlimited
    oracle  hard    core            unlimited
    Setting  user 'oracle' OS limits for Oracle VM Manager ...
    Altered file /etc/security/limits.conf
    Original file backed up at /etc/security/limits.conf.orabackup
    Verifying & setting of user limits succeeded ...
    Creating mountpoint '/u01' ...
    Modifying iptables for OVM
    Adding rules to enable access to:
         7002  : Oracle VM Manager https
         54322 : Oracle VM Manager core via SSL
           123 : NTP
         10000 : Oracle VM Manager CLI Tool
    service iptables status: stop
    Saving firewall rules to /etc/sysconfig/iptables:          [  OK  ]
    Flushing firewall rules:                                   [  OK  ]
    Setting chains to policy ACCEPT: filter                    [  OK  ]
    Unloading iptables modules:                                [  OK  ]
    Applying iptables firewall rules:                          [  OK  ]
    Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]
    Flushing firewall rules:                                   [  OK  ]
    Setting chains to policy ACCEPT: filter                    [  OK  ]
    Unloading iptables modules:                                [  OK  ]
    Rules added.

    // 安裝開始

    sh runInstaller.sh
    

    TIPs:

    * 如果遇到 disk 可用空間只夠安裝 OVMM,如果再上傳 OVMM 的安裝 ISO 檔後(約 2.5GB),可用空間就會不夠,此時可以利用外部的 NFS 分享目錄。

    * 使用 NFS 目錄安裝時,先執行 chmod -R 0755,避免某些檔案權限不足。

    * 安裝時間需要 2x-3x 分鐘,請耐心等候。

    * 安裝時設定密碼必須符合 8-16 字元、至少包含大小寫各一個字母、至少包含一個數字或特殊符號。

    * 詢問輸入 網域名稱/IP 時,不可輸入 localhost 或 127.0.0.1。

    OVMM 3.1.x:

    Please select an installation type:
       1: Demo
       2: Production
       3: Uninstall
       4: Help

       Select Number (1-4): 2

    Oracle Database Repository
    ==========================
    Would you like to install Oracle Database 11g Express Edition (XE) or connect to an existing Oracle database?
       1: Install Oracle Database 11g XE
       2: Use an existing Oracle database

       Select Number (1-2): 1

    Enter the Oracle Database SYSTEM password:
    Enter the Oracle Database SYSTEM password (confirm):
    Enter the Oracle Application Express (APEX) port [8080]:
    Enter the Oracle Database listener port [1521]:
    Enter the Oracle VM Manager database schema [ovs]:
    Enter the Oracle VM Manager database schema password:
    Enter the Oracle VM Manager database schema password (confirm):

    Oracle Weblogic Server 11g
    ==========================
    Enter the Oracle WebLogic Server 11g user [weblogic]:
    Enter the Oracle WebLogic Server 11g user password:
    Enter the Oracle WebLogic Server 11g user password (confirm):

    Oracle VM Manager application
    =============================
    Enter the username for the Oracle VM Manager administration user [admin]:
    Enter the admin user password:
    Enter the admin user password (confirm):

    Start installing the configured components:
       1: Continue
       2: Abort

       Select Number (1-2): 1

    ....
    ...

    OVMM 3.2.x:

    Please select an installation type:
       1: Simple (includes database if necessary)
       2: Custom (using existing Oracle database)
       3: Uninstall
       4: Help

       Select Number (1-4):1
      
    Starting production with local database installation ...

    Verifying installation prerequisites ...
    *** WARNING: Recommended memory for the Oracle VM Manager server installation using Local MySql DB is 7680 MB RAM

    One password is used for all users created and used during the installation.
    Enter a password for all logins used during the installation: <密碼必須包含有大小寫英文與數字>

    OVMM 3.3.1:

    Please select an installation type:
       1: Install
       2: Upgrade
       3: Uninstall
       4: Help

       Select Number (1-4): 1
      
    One password is used for all users created and used during the installation.
    Enter a password for all logins used during the installation: <密碼必須包含有大小寫英文與數字>

    Please enter your fully qualified domain name, e.g. ovs123.us.oracle.com, (or IP address) of your management server for SSL certification generation 10.15.9.30 [ovmm.localdomain]: <Enter>

    Start installing Oracle VM Manager:
       1: Continue
       2: Abort

       Select Number (1-2): 1

    4. 安裝 ovmcore-console

    為了要能透過 VNC 連接到 VM 做管理,必須要再安裝這個套件。

    cd /mnt/iso
    rpm -ivh ovmcore-console-1.0-36.el5.noarch.rpm 
    

    安裝完成。

    OVMM 3.1.x)

    打開瀏覽器輸入 http://ovmm.ip.address:7001/ovm/console,帳號 admin,密碼如安裝時的設定。

    OVMM 3.2.x, 3.3.1)

    URL 改成 https://ovmm.ip.address:7002/ovm/console,帳號 admin,密碼如安裝時的設定。

    5. 設定校時服務

    為了確保所有的 OVS 主機與 OVMM 的時間有同步,必須先啟動 OVMM 的時間伺服器

    安裝 ntp 套件

    yum install ntp
    

    設定系統時區

    編輯 /etc/sysconfig/clock 或指令 setup。

    設定 NTPD

    編輯 ntp.conf

    // 這裡要設定 OVS 的網段,如果有其他網段的主機也要做校時,也可以加上。
    # Hosts on local network are less restricted.
    restrict 192.168.7.0 mask 255.255.255.0 nomodify notrap
    
    // 註解這兩行
    #server 127.127.1.0     # local clock
    #fudge  127.127.1.0 stratum 10
    
    //這裡是上層的 NTP 校時主機位址
    server 0.rhel.pool.ntp.org
    server 1.rhel.pool.ntp.org
    server 2.rhel.pool.ntp.org
    

    啟動 NTPD 服務

    service ntpd start
    chkconfig ntpd on 
    

    檢查指令

    ntpq -p
    

    delay 與 offset 值不能是 0, jitter 值應該 < 100。

    Q & A

    Q: 安裝失敗出現錯誤訊息

    Verifying installation prerequisites ...
    Missing required package. Oracle VM Manager requires numactl to be installed.
    Configuration verification failed ...

    A: 檢查安裝 log 檔 /var/log/ovmm/ovm-manager-3-install-2018-04-28-024902.log

    CST Apr 28 02:49:05.402 system.process DEBUG    system.process.start
    CST Apr 28 02:49:05.458 system.process DEBUG    system.process.run ended, exitcode was 1
    CST Apr 28 02:49:05.458 system.process DEBUG    system.process.run stdout:
    package numactl is not installed

    安裝套件 numactl

    yum install numactl
    
    Q: 安裝時發生錯誤 Unable to ping hostname 'ovmm.xxx.xxx'.

    A:編輯 /etc/hosts,將主機名稱加上。

    Powered by MindTouch Core