水曜日, 6月 03, 2009

VMware Server入門 (第1回、インストール、Linuxホスト編)

[概要]
Linux版VMware Server 2.0.xのインストール方法を説明しています。

[詳細]
VMware Serverは、VMware社から無償で提供されているType2ハイパーバイザ型の仮想化環境です。
Type2ハイパーバイザは、ホスト型とも呼ばれ、ハードウェア上にOSが稼動し、その上でハイパーバイザ(仮想化ソフト)がアプリケーションとして動作する物のことを指します。狭義ではハイパーバイザ型といわずホスト型と呼ばれています。
VMware Serverは、Linux版とWindows版とが提供されています。さらに、Linux版にはx86_64用とi386用とがありRPMパッケージとtar.gzの形式がそれぞれ存在します。
  1. VMware Serverの入手
    VMware社のWEBページからVMware Serverをダウンロードするためには、アカウントの作成が必要です。そこで、登録方法から説明します。

    1. "VMware Server"の紹介ページからダウンロードをクリックし、ログイン画面に移ります。



    2. 必要事項の記入、使用許諾に同意して、ダウンロードンページに移動します。


    3. 画面表示されるライセンス・キーのメモし、必要なイメージをダウンロードします。

  2. インストール
    rpm形式とtar.gzパッケージの分けて説明します。

    [rpmの場合]
    ダウンロードしたパッケージを、rpmコマンドでインストールします。
    [root@vmsv ~]# rpm -Uvh VMware-server-2.0.0-122956.i386.rpm
    Preparing... ########################################### [100%]
    1:VMware-server ########################################### [100%]

    The installation of VMware Server 2.0.0 for Linux completed successfully.
    You can decide to remove this software from your system at any time by
    invoking the following command: "rpm -e VMware-server".

    Before running VMware Server for the first time, you need to
    configure it for your running kernel by invoking the
    following command: "/usr/bin/vmware-config.pl".

    Enjoy,

    --the VMware team

    モジュールのインストールは完了です。
    "コンフィグレーションの実行"へ進んでください。

    [tar.gzの場合]
    パッケージをtarコマンドで展開すると、"vmware-server-distrib"というディレクトリに展開されます。vmware-server-distribに移動し、そこにあるインストーラ(vmware-install.pl)を実行してください。
    user@ubuntu:~$ tar xvfz VMware-server-2.0.1-156745.i386.tar.gz
    user@ubuntu:~$ cd vmware-server-distrib/
    user@ubuntu:~/vmware-server-distrib$ sudo ./vmware-install.pl
    [sudo] password for user:

    様々なインストール・パスを質問されますが、特に意識して変更する場合以外には、デフォルトの設定でかまいません。
    Creating a new VMware Server installer database using the tar4 format.

    Installing VMware Server.

    In which directory do you want to install the binary files?
    [/usr/bin]

    What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
    [/etc]

    What is the directory that contains the init scripts?
    [/etc/init.d]

    In which directory do you want to install the daemon files?
    [/usr/sbin]

    In which directory do you want to install the library files?
    [/usr/lib/vmware]

    The path "/usr/lib/vmware" does not exist currently. This program is going to
    create it, including needed parent directories. Is this what you want?
    [yes]

    In which directory do you want to install the manual files?
    [/usr/share/man]
    In which directory do you want to install the documentation files?
    [/usr/share/doc/vmware]

    The path "/usr/share/doc/vmware" does not exist currently. This program is
    going to create it, including needed parent directories. Is this what you want?
    [yes]


    引き続きコンフィグレーションの行うか否かについて、質問されます。デフォルトの"yes"で、"コンフィグレーションの実行"へ進みます。
    "no"で答え場場合には、別途改めて"/usr/bin/vmware-uninstall.pl"を実行してください。

    The installation of VMware Server 2.0.1 build-156745 for Linux completed
    successfully. You can decide to remove this software from your system at any
    time by invoking the following command: "/usr/bin/vmware-uninstall.pl".

    Before running VMware Server for the first time, you need to configure it by
    invoking the following command: "/usr/bin/vmware-config.pl". Do you want this
    program to invoke the command for you now? [yes]


  3. コンフィグレーションの実行
    コンフィグレーション・スクリプト(/usr/bin/vmware-config.pl)を実行します。
    1. ライセンスが表示されますので、最後に表示される同意するか否かについて質問に答えます。

      Making sure services for VMware Server are stopped.
      Stopping VMware autostart virtual machines:

      <中略>

      Software for internal or external use, promotion, review or as part of a
      solution, please apply now at http://www.vmware.com/go/distribution.

      Do you accept? (yes/no)

    2. 仮想環境のネットワークの設定を行います。
      VMware Serverには、ネットワーク種類が3つあり、それぞれ、下記の通りです。
      • ブリッジ接続
        ホストマシンのネットワーク・カードにバインドすることで、ホストマシンと同じLAN上に仮想マシンがあるように見えます。
      • NAT接続
        仮想ルータを通して、仮想環境の外部ネットワークにアクセスします。
      • host-only接続
        仮想環境の中だけで利用するネットワークを構成します。外部ネットワークに接続することができません。

        ブリッジ接続の要不要について答え、必要と答えた場合はブリッジ接続の設定に進みます。
        ネットワーク名、ブリッジするホスト・デバイスを設定します。
        ネットワークを複数構成する場合には、"Do you wish to configure another bridged network? (yes/no)"に"Yes"と答えて、設定を繰り返してください。

        Do you want networking for your virtual machines? (yes/no/help) [yes]

        Configuring a bridged network for vmnet0.

        Please specify a name for this network.
        [Bridged]

        Your computer has multiple ethernet network interfaces available: eth0, pan0.
        Which one do you want to bridge to vmnet0? [eth0]

        The following bridged networks have been defined:

        . vmnet0 is bridged to eth0

        Do you wish to configure another bridged network? (yes/no) [no]

      1. NAT接続の要不要について答え、必要と答えた場合はNATネットワークの設定に進みます。
        ネットワーク名、ブリッジするホスト・デバイス、NATの内側のプライベートアドレスの設定します。
        プライベートアドレスは、デフォルトは空いているネットワークアドレスを自動的に検索します。
        "Do you want this program to probe for an unused private subnet? (yes/no/help)"に"no"で答えると、
        自分でネットワークアドレスを設定することができます。
        ネットワークを複数構成する場合には、"Do you wish to configure another NAT network? (yes/no)"に"Yes"と答えて、設定を繰り返してください。

        Do you want to be able to use NAT networking in your virtual machines? (yes/no)
        [yes]

        Configuring a NAT network for vmnet8.

        Please specify a name for this network. [NAT]

        Do you want this program to probe for an unused private subnet? (yes/no/help)
        [yes]

        Probing for an unused private subnet (this can take some time)...

        The subnet 192.168.123.0/255.255.255.0 appears to be unused.

        The following NAT networks have been defined:

        . vmnet8 is a NAT network on private subnet 192.168.123.0.

        Do you wish to configure another NAT network? (yes/no) [no] yes

        Configuring a NAT network for vmnet3.

        Please specify a name for this network. [NAT]NAT2

        Do you want this program to probe for an unused private subnet? (yes/no/help)
        [yes] no

        What will be the IP address of your host on the private
        network? 192.168.4.0

        What will be the netmask of your private network? 255.255.255.0

        The following NAT networks have been defined:

        . vmnet3 is a NAT network on private subnet 192.168.4.0.
        . vmnet8 is a NAT network on private subnet 192.168.123.0.

        Do you wish to configure another NAT network? (yes/no) [no]

      2. host-only接続の要不要について答え、必要と答えた場合はhost-onlyネットワークの設定に進みます。
        ネットワーク名、ブリッジするホスト・デバイス、プライベートアドレスの設定します。
        プライベートアドレスは、デフォルトは空いているネットワークアドレスを自動的に検索します。
        "Do you want this program to probe for an unused private subnet? (yes/no/help)"に"no"で答えると、
        自分でネットワークアドレスを設定することができます。
        ネットワークを複数構成する場合には、Do you wish to configure another host-only network? (yes/no)に"Yes"と答えて、設定を繰り返してください。

        Do you want to be able to use host-only networking in your virtual machines?
        [yes]

        Configuring a host-only network for vmnet1.

        Please specify a name for this network.
        [HostOnly]

        Do you want this program to probe for an unused private subnet? (yes/no/help)
        [yes]

        Probing for an unused private subnet (this can take some time)...

        The subnet 192.168.6.0/255.255.255.0 appears to be unused.

        The following host-only networks have been defined:

        . vmnet1 is a host-only network on private subnet 192.168.6.0.

        Do you wish to configure another host-only network? (yes/no) [no]

      3. 各種ポート番号の設定
        リモート接続、HTTP接続、HTTPS接続で使用するポート番号をそれぞれ指定します。
        Please specify a port for remote connections to use [902]

        Please specify a port for standard http connections to use [8222]

        Please specify a port for secure http (https) connections to use [8333]

      4. 管理者の指定
        仮想環境の管理者を指定します。管理者はOSに登録されているユーザでなければなりません。
        The current administrative user for VMware Server is ''. Would you like to
        specify a different administrator? [no] yes

        Please specify the user whom you wish to be the VMware Server administrator
        root

        Using root as the VMware Server administrator.

      5. データストア(Datastore)の指定
        バーチャルマシンの格納場所をデータストアといいます。このデータストアとなる場所のパス指定します。十分な空き領域がある場所を指定してください。
        ディレクトリが存在しない時には作成の許可を質問されますので、問題なければデフォルトの"yes"で進んでください。

        In which directory do you want to keep your virtual machine files?
        [/var/lib/vmware/Virtual Machines]

        The path "/var/lib/vmware/Virtual Machines" does not exist currently. This
        program is going to create it, including needed parent directories. Is this
        what you want? [yes]

      6. ライセンス・キーの登録
        ダウンロード・ページでメモしたライセンス・キーを入力します。

        Please enter your 20-character serial number.

        Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel:

      7. VMware VIX APIのインストールを行います。
        "VMware VIX API"は、バーチャルマシンの操作の自動化、スクリプトの実行、バーチャルマシン間でのファイル転送を可能にするAPIです。
        インストール先のパスを指定します。インストールパスは、意図して変更する必要がない場合には、デフォルトのままでかまいません。

        Creating a new VMware VIX API installer database using the tar4 format.

        Installing VMware VIX API.

        In which directory do you want to install the VMware VIX API binary files?
        [/usr/bin]

        In which directory do you want to install the VMware VIX API library files?
        [/usr/lib/vmware-vix/lib]

        The path "/usr/lib/vmware-vix/lib" does not exist currently. This program is
        going to create it, including needed parent directories. Is this what you want?
        [yes]

        In which directory do you want to install the VMware VIX API document pages?
        [/usr/share/doc/vmware-vix]

        The path "/usr/share/doc/vmware-vix" does not exist currently. This program is
        going to create it, including needed parent directories. Is this what you want?
        [yes]


        The installation of VMware VIX API 1.6.2 build-156745 for Linux completed
        successfully. You can decide to remove this software from your system at any
        time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl".

        Enjoy,

        --the VMware team

        The configuration of VMware Server 2.0.1 build-156745 for Linux for this
        running kernel completed successfully.
        <以下省略>

以上で、サーバ側でのインストール、設定は完了です。
次回はWindows版のインストールについて説明します。

0 件のコメント: