2.2 Oracle VM Server Controlの使用方法

2.2.1 ovm_servercontrolのコマンドライン・オプションおよびパラメータ
2.2.2 ovm_servercontrolの使用例

ovm_servercontrolユーティリティは、物理Oracle VM Server上で動作します。これにより、管理者は、特定のOracle VM Server上で基本的なサーバー・コマンドを実行したり、そのステータスを問い合せたり、重要な情報を取得できます。

このツールで利用できるすべての操作は、Oracle VMコマンドライン・インタフェースを使用する方がよりよく処理できますが、レガシー・システムをサポートするために含まれています。

2.2.1 ovm_servercontrolのコマンドライン・オプションおよびパラメータ

ovm_servercontrolユーティリティには、次のコマンドライン・オプションがあります。

  • -u Oracle VM Manager管理ユーザーのユーザー名(必須)

  • -p 管理ユーザー名に対応するパスワード(必須)

  • -h Oracle VM Managerを実行しているサーバーのホスト名(必須)

  • -X SSLを使用して、tcps://host:54322でOracle VM Managerに接続

  • -s Oracle VM Server名

  • -I Oracle VM Server ID

  • -P 検出されるOracle VM Serverのエージェント・パスワード(-c discoverと同時に使用)

  • -r 記憶域リポジトリ名(NFSエクスポート用)

  • -i NFSエクスポートのID

  • -o NFSエクスポートのオプション

  • -C NFSエクスポートのクライアント・ホスト名

  • -A イベントの承認(-c eventsと同時に使用)

    Oracle VM ServerのイベントおよびOracle VM Serverがホストする仮想マシンを承認するには、-A allを使用します。

  • -c コンソール・コマンド(必須)

    [コマンド: start, stop, restart, kill, discover, mainton, maintoff, status, info, events, lock, upgrade, refresh, list, listnfsexports, createnfsexport, deletenfsexport]

注意

maintonおよびmaintoffコマンドは、Oracle VM Serverメンテナンス・モードを有効化または無効化します。

discoverコマンドは、まだOracle VM Managerで検出されていないOracle VM Server上の検出操作を実行します。

upgradeコマンドは、特定のOracle VM Server上でyumアップグレードを開始します。

listコマンドは、Oracle VM Serverのname引数を必要としません。システムに登録されているすべてのOracle VM Serverを表示します。

2.2.2 ovm_servercontrolの使用例

ovm_servercontrolコマンドおよびそれぞれの出力の例は次のとおりです。

  • 登録されているすべてのOracle VM Serverを表示します。

    # ./ovm_servercontrol -u admin -p password -h localhost -c list
    Oracle VM Server Control utility 0.5.2.
    Connected.
    Command : list
    Server : 'OVS_01'
         ID     : '00:e0:81:4d:40:16:00:e0:81:4d:40:17:ff:ff:ff:ff'
         pool   : 'MyServerPool1'
         status : 'Running'
    
    Server : 'OVS_02'
         ID     : '00:e0:81:4d:5e:82:00:e0:81:4d:5e:83:ff:ff:ff:ff'
         pool   : 'unassigned'
         status : 'Running'
    
    Server : 'OVS_03'
         ID     : '00:e0:81:4d:5e:16:00:e0:81:4d:5e:17:ff:ff:ff:ff'
         pool   : 'MyServerPool1'
         status : 'Running'
    
    Server : 'OVS_04'
         ID     : '00:e0:81:4d:40:f5:00:e0:81:4d:40:be:00:e0:81:4d'
         pool   : 'unassigned'
         status : 'Running'
    
    Exit...
  • Oracle VM Serverのステータスをチェックします。

    # ./ovm_servercontrol -u admin -p password -h localhost -s OVS_03 -c status
    Oracle VM Server Control utility 0.5.2.
    Connected.
    Command : status
    Server : 'OVS_03' status : 'Running' serverpool : 'MyServerPool1'.
    Exit...
  • Oracle VM Serverの詳細情報を表示します。

    # ./ovm_servercontrol -u admin -p password -h localhost -s OVS_01 -c info
    Oracle VM Server Control utility 0.5.2.
    Connected.
    Command : info
    Server : OVS_01
            Status       : Running
            Management IP: 10.172.76.90
            Hostname     : OVS_01
            ID           : 00:e0:81:4d:40:16:00:e0:81:4d:40:17:ff:ff:ff:ff
            Pool         : MyServerPool1
            CPU threads  : 4
            CPU Usage    : 1.877896
            Total Memory : 32767
            Usable Memory: 31261
            Maintenance  : false
            Master Server: true
            Up to date   : true
            Virtual Machines on this server :
               Name   : 'MyVM01'
                  Status : 'Stopped'
               Name   : 'MyVM02'
                  Status : 'Running'
    Exit...
  • Oracle VM Serverを再起動します。

    # ./ovm_servercontrol -u admin -p password -h localhost -s OVS_02 -c restart 
    Oracle VM Server Control utility 0.5.2. 
    Connected. 
    Command : restart 
    restartserver 'OVS_02' completed. 
    Exit...
  • NFSを使用したOCFS2リポジトリの公開:

    注意

    この例では、NFSエクスポートの作成を示して、次に既存のエクスポートをリストしています。記憶域リポジトリは、2つの異なるクライアントに公開されますが、その後に1つのエクスポートはそのIDによって削除されます。最下部のmountコマンドでは、残りのエクスポートがまだ使用可能であることを示しています。

    # ./ovm_servercontrol -u admin -p password -h localhost -c createnfsexport -s OVS_04 \
    -C NFS_02 -o rw,no_root_squash -r MyIscsiRepo 
    Oracle VM Server Control utility 0.5.2.
    Connected.
    Command : createnfsexport
    Creating nfs export for repository 'MyIscsiRepo' on server.
    Created repository export
    Exit...
    
    # ./ovm_servercontrol -u admin -p Manager1 -h localhost -c listnfsexports -s OVS_04
    Oracle VM Server Control utility  0.5.2.
    Connected.
    Command : listnfsexports
    NFS Exports :
            id         : 0004fb0000230000978a28e2dc85e06b
            client     : NFS_01
            options    : 
            repository : MyIscsiRepo
            path       : /OVS/Repositories/0004fb000003000031fac25b24740cca/
    ---
            id         : 0004fb00002300004b161fd1a0d106b7
            client     : NFS_02
            options    : rw,no_root_squash
            repository : MyIscsiRepo
            path       : /OVS/Repositories/0004fb000003000031fac25b24740cca/
    ---
    Exit...
    
    # ./ovm_servercontrol -u admin -p password -h localhost -c deletenfsexport -s OVS_04 \
    -i 0004fb0000230000978a28e2dc85e06b
    Oracle VM Server Control utility 0.5.2.
    Connected.
    Command : deletenfsexport
    Deleting nfs export with ID '0004fb0000230000978a28e2dc85e06b'
    Deleted repository export
    Exit...
    
    [root@NFS_02]# mount OVS_04:/OVS/Repositories/0004fb000003000031fac25b24740cca /mnt/repoexport
    [root@NFS_02]# ls /mnt/repoexport
    Assemblies  ISOs  lost+found  Templates  VirtualDisks  VirtualMachines