B.2 ツールを使用する前に

このセクションでは、次の情報を紹介します。

B.2.1 Migrate Serverの値のCLI向け事前環境設定

コマンドラインユーティリティを使用する前に、Migrate Serverが正しく設定されていることを確認する必要があります。設定は、コマンドラインユーティリティと同じパスに存在するPlateSpin.Migrate.Console.configファイルでチェックできます。Migrateのインストール後の.configファイルには、次の値がすでに設定されています。

<?xml version="1.0" encoding="utf-8 ?>"
<configuration>
  <appSettings>
    <add key="migrateServerURL" value="http://localhost/PlateSpinMigrate/"/>
    <add key="psuser" value="administrator"/>
    <add key="pspassword" value="password"/>
  </appSettings>
</configuration>

このツールは、コマンドを実行する際にこれらの値を使用します。このファイル内の値は、接続するMigrate Serverの設定と一致させる必要があります。

B.2.2 コマンドの理解

ツールでサポートされているコマンドを表示するには、次に示すように、コマンドプロンプトでHelpオプションまたは?オプションを指定してツールを実行します。

C:\Program Files\PlateSpin Migrate Client>CommandLine\PlateSpin.Migrate.Console.exe Help

次の表に示すような情報が表形式で表示されます。

表 B-1 Migrate CLIツールで使用可能なコマンド

コマンド

説明

run

設定済みの.iniファイルをスケジュールされたジョブとして実行します。/wait=noパラメータを追加してジョブの実行を開始すると、そのジョブのジョブIDがインタフェースに表示されます。

query

(ジョブIDを指定した場合)ジョブに対するクエリを実行して、その現在のステータスを表示します。

discover

マイグレーションジョブまたは「変換」ジョブに備えて、サポートされているワークロードまたはターゲットコンピュータの詳細をインベントリ収集する操作を実行します。

refresh

検出済みサーバをリフレッシュします。

unDiscover

サーバの情報を破棄します。

prepareForSync

サーバ同期操作に備えてサーバを準備します。このコマンドは、ServerSyncジョブ(すなわちServerSync-xxx.ini)を実行する前に、(適切なパラメータを指定して)実行します。

imageserver

ワークロードに対するイメージング操作(すなわちサーバのインストール、サーバのアンインストール、ツールのアップデート)を実行します。

abort

スケジュールされたジョブを中止します。

これらのコマンドを実行する場合、コマンドラインで必須パラメータを指定する必要があります。また、必要に応じてオプションパラメータを指定することもできます。コマンドプロンプトでパラメータのリストを表示するには、パラメータなしでコマンドを実行します。たとえば、次に示すように、パラメータなしでdiscoverコマンドを実行します。

C:\Program Files\PlateSpin Migrate Client>CommandLine\PlateSpin.Migrate.Console.exe discover

この場合、コマンドラインインタフェースに次の情報が表示されます。

[discover]                      discovers a server
Required Parameters:
    /machineAddress=      machine address to discover
    /userName=            the username to use   
    /password=            the password to use        
    /type=                typle like windows, hyper_v, linux,vmware_esx,vmware_vcenter,citrix_xenserver, kvm_server
    Optional Parameters:
    /network=             network name to connect to
    /address=             server address to connect to
    /psuser=              Username used for accessing PlateSpin Migrate server as user different from the one logged on this computer
    /pspassword=          Password used for accessing Platespin Migrate server for the user different from the one logged on this computer
    /wait=                wait for completion of job [yes,no]
    /clusterName=         clustername to be discovered
    /verbose=             verbose mode for output [on,off]
    /output=              the output file
    /format=              the ouptput format to display in [text,html,xml]
    /sslcertificatewarnings=      Whether to Ignore or Enforce SSL Certificate Warnings [Ignore| Enforce]

メモ:さまざまなCLIコマンドおよびそれぞれの必須パラメータとオプションパラメータを理解する必要があります。

コマンドライン構文

discoverコマンド(これはジョブでもあります)を実行する場合、コマンドプロンプトで、次の例と同様の構文を使用します。

C:\Program Files\PlateSpin Migrate Client>CommandLine\PlateSpin.Migrate.Console.exe discover /machineaddress=10.10.8.100 /username=administrator /password=password /type=windows /wait=no

この例では、すべての必須パラメータと1つのオプションパラメータが指定されています。

discoverコマンド(ジョブ)が実行を開始すると、次の例に示すようなジョブIDがCLIツールに表示されます。

8be8d306-7665-4869-9795-a9dbb3ce1471

このIDを使用すると、次に示すようにqueryコマンドを使用するだけで、ジョブのステータスを調べることができます。

C:\Program Files\PlateSpin Migrate Client>CommandLine\PlateSpin.Migrate.Console.exe query /id=8be8d306-7665-4869-9795-a9dbb3ce1471

queryコマンドは、ジョブのすべての詳細を含むステータスレポートを生成します。これは、[Migrate Client Jobs(Migrate Clientジョブ)]ビューに表示される情報と同じ種類の情報です。