2006/11/09

VMware Server インストール

ポスト @ 21:29:51 | Software

LAN向けサーバーをそのままインターネット公開サーバーにするのはセキュリティ上好ましくないけどマシンを2台確保する場所もお金もないので、はやりの仮想化で対応することにした。当初はXenでやろうとしたんだけど CentOS 4.4 に入れるのは結構面倒なことが発覚したので、同じく無償の VMware Server を使用することにした。パフォーマンス的にはXenのほうが良いはずだけど、導入やメンテナンスは VMware Server のほうが楽そうだ。二つのアーキテクチャの違いは @IT:仮想化技術のアプローチと実装 を参照してほしい。

以下は VMware Server for Linux のインストール方法である。

まずは VMware Server を入手しよう。VMware Member Site にユーザー登録し、「評価版ダウンロード」から VMware Server Linux:RPM と マネージメントインターフェース Linux:tar をダウンロードする。Management Interface は必須ではないけど、これがあるとWeb上でマシン・リソースの監視ができたりして便利だ。そしてシリアル・ナンバーが必要なので、「ライセンスキー」からシリアル・ナンバーを発行しよう。

VMware Server Linux:RPM のインストールを行う。RPMなのでインストールは簡単だ。

# rpm -ihv VMware-server-1.0.1-29996.i386.rpm Preparing... ########################################### [100%] 1:VMware-server ########################################### [100%] # rpm -qa | grep -i vmware VMware-server-1.0.1-29996

VMware Server の設定を行うため、vmware-config.plを実行する。このスクリプトはカーネルのアップデートのたびに実行する必要があり、これを忘れるとゲストOSが起動しないので注意が必要だ。yumやup2dateのアップデート対象からカーネルを外すのが無難だろう。インストーラーを実行すると使用許諾書が表示されるので、同意できる場合はqで閉じてyesと入力する。

# vmware-config.pl Making sure services for VMware Server are stopped. Stopping VMware services: Virtual machine monitor [ OK ] You must read and accept the End User License Agreement to continue. Press enter to display it. [Enter] Do you accept? (yes/no) yes Thank you.

インストール・ディレクトリの設定などを行うが、基本的にはデフォルトのままで良いだろう。

Configuring fallback GTK+ 2.4 libraries. In which directory do you want to install the mime type icons? [/usr/share/icons] [Enter] What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications] [Enter] In which directory do you want to install the application's icon? [/usr/share/pixmaps] [Enter]

使用しているカーネルに適合するvmmonがあればそのままインストールされ、なければコンパイルが行われる。

Trying to find a suitable vmmon module for your running kernel. The module bld-2.6.9-11.EL-i686smp-RHEL4 loads perfectly in the running kernel.

ネットワークの設定を行う。VMware Server では、ホストOSとは異なるIPアドレスをゲストOSで使用するブリッジ・モードと、ホストOSのIPアドレスをNATして共有するNATモード、ホストOSからしかゲストOSにアクセスできないホストオンリー・モードがある。IPアドレスの配布に制限がある特殊な場合を除いては、ブリッジ・モードで問題ないだろう。以下ではNATモードの使用をオフにしている。

Do you want networking for your virtual machines? (yes/no/help) [yes] [Enter] Configuring a bridged network for vmnet0. The following bridged networks have been defined: All your ethernet interfaces are already bridged. Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] no Do you want to be able to use host-only networking in your virtual machines? [no] [Enter]

使用しているカーネルに適合するvmnetがあればそのままインストールされ、なければコンパイルが行われる。

Trying to find a suitable vmnet module for your running kernel. The module bld-2.6.9-11.EL-i686smp-RHEL4 loads perfectly in the running kernel.

VMware Server Console から接続するポートを設定する。デフォルトでは902となる。

Please specify a port for remote console connections to use [902] [Enter] xinetd を停止中: [ OK ] xinetd を起動中: [ OK ]

VMware VMPerl Scripting API のコンパイルが行われる。

Configuring the VMware VmPerl Scripting API. Building the VMware VmPerl Scripting API. Using compiler "/usr/bin/gcc". Use environment variable CC to override. Installing the VMware VmPerl Scripting API. The installation of the VMware VmPerl Scripting API succeeded.

SSL認証ファイルが作成され、ゲストOSのイメージ・ファイルの保存先を設定する。

Generating SSL Server Certificate In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] [Enter] 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] [Enter]

メールで受け取った20桁のシリアル・ナンバーを入力すれば設定は終了だ。

Please enter your 20-character serial number. Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: 01234-56789-ABCDE-F0123 Starting VMware services: Virtual machine monitor [ OK ] Virtual ethernet [ OK ] Bridged networking on /dev/vmnet0 [ OK ] The configuration of VMware Server 1.0.1 build-29996 for Linux for this running kernel completed successfully.

次に マネージメントインターフェース Linux:tar のインストールを行う。インストーラーを実行すると使用許諾書が表示されるので、同意できる場合はqで閉じてyesと入力する。

# tar zxf VMware-mui-1.0.1-29996.tar.gz # cd vmware-mui-distrib # ./vmware-install.pl Creating a new installer database using the tar3 format. You must read and accept the End User License Agreement to continue. Press enter to display it. [Enter] Do you accept? (yes/no) yes Thank you.

インストール・ディレクトリの設定などを行うが、基本的にはデフォルトのままで良いだろう。vmware-uninstall-mui.plでアンインストールできることは忘れないでおこう。

Installing the content of the package. In which directory do you want to install the binary files? [/usr/bin] [Enter] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc/rc.d] [Enter] What is the directory that contains the init scripts? [/etc/rc.d/init.d] [Enter] In which directory do you want to install the VMware Management Interface files? [/usr/lib/vmware-mui] [Enter] The path "/usr/lib/vmware-mui" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] [Enter] In which directory would you like to install the documentation files? [/usr/lib/vmware-mui/doc] [Enter] The path "/usr/lib/vmware-mui/doc" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] [Enter] The installation of VMware Management Interface 1.0.1 build-29996 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-mui.pl".

つづいて Management Interface の設定を行う。

Before running VMware Management Interface for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-mui.pl". Do you want this program to invoke the command for you now? [yes] [Enter] Configuring httpd.conf to run Apache as: User: nobody and Group: nobody Set the number of minutes before a http session times out. (This is the length of time before someone connecting to VMware Management Interface will be logged out) [60] [Enter] Generating SSL Server Certificate Starting httpd.vmware: [ OK ] The configuration of VMware Management Interface completed successfully.

なお、VMware Server はvmware、Management Interface はhttpd.vmwareというサービスで登録されているので、起動終了は以下のように行える。

# service vmware stop Stopping VMware services: Virtual machine monitor [ OK ] Bridged networking on /dev/vmnet0 [ OK ] Virtual ethernet [ OK ] # service vmware start Starting VMware services: Virtual machine monitor [ OK ] Virtual ethernet [ OK ] Bridged networking on /dev/vmnet0 [ OK ] Starting VMware virtual machines... [ OK ] # service httpd.vmware stop Shutting down http.vmware: [ OK ] # service httpd.vmware start Starting httpd.vmware: [ OK ]

VMware Server を入れると合わせて VMware Server Console が合わせてインストールされているが、別マシンからアクセスする場合はそのマシンに VMware Server Console を別途インストールする必要がある。

VMware Server Console は VMware Member Page からもダウンロードできるが、せっかくなので Management Interface からダウンロードしよう。ところが Management Interface のポート番号が不明のため、まずはそれを確認しよう。

$ grep ^Port /usr/lib/vmware-mui/apache/conf/httpd.conf Port 8222

http://hostname:port/ にアクセスするとログイン画面と合わせてダウンロード・リンクがあるので、そちらからダウンロードする。なお、Management Interface はSafariでは正しく動かないのでFirefoxまたは Internet Explorer を使おう。まぁ、そもそも VMware Server Console for Mac がないわけだが。

VMware Management Interface

これにて VMware Server 使う環境はそろった。次回はいよいよゲストOSの作成に入る。

参考:VMware Server 運用ガイド

9 Trackbacks

VMware Server ゲストOS作成

前回の VMware Server インストール に引き続き、仮想マシンの作成とゲストOSのセットアップを行おう。 まずは VMware Server Console を起動しよう。Window...

From : 複眼中心 @ 2007-01-19 08:52:26

VMware Severインストール

なべラボの開発環境として、無料化されたVMware Serverを導入したときの...

From : なべラボ @ 2007-04-05 00:02:49

VMware Server ConsoleとManagement Interface

当初、VMware Server ConsoleはホストOS上で vmware ...

From : なべラボ @ 2007-04-05 01:09:29

VMware Serverのアップデート

 2chのVMwareのスレッドを見ていたら、VMware Server 1.0...

From : なべラボ @ 2007-05-05 23:13:22

VMware Management Interface

今までインストールしてなかったのですが、 VMware Serverをアップデート したついでに、Host OSの CentOSに VMware Management Interface をインストールしました。 Webブラウザで VMware Serverの管理インターフェイスにアクセスして、Virtual Machineを管理でき....

From : しげふみメモ @ 2007-05-08 22:14:53

サーバ仮想化:Virtual PC 2007とVMWareServer

こんにちは、担当上岡です。 何かWebアプリケーションを開発する際、本番サーバで...

From : 匠システム @ 2007-05-17 18:22:23

VMware Server 参考サイト

自宅のサーバ(DELL SC430)上ではVMwareServerを使ったVM(...

From : juyama.net @ 2007-05-30 14:41:20

AsteriskNOWでIP電話はじめましょう

きちんとAsteriskでIP電話のシステムを作りたくて、今日はいろいろ作業しました。まずはサーバーの設定から。 今までは、ファイルサーバーに使っているマシンにAsteriskをインストールし...

From : 北青山通信 - from aoyama @ 2008-05-05 01:29:39

[Server]VMWare in Cent OS

JunkStageの開発サーバーを使っているデスクトップに入れていたんだけど、nProtectが入っているゲームをするとVMWare自体が応答なくなるので、Cent OSに入れることにしました。 CentOS install X Window install VMWare Server install VMWare の .VMXファイルをコピー 動か

From : ほむり @ 2008-11-03 16:53:44

Track from Your Website

http://rewse.jp/fukugan/trackback/tb.php?id=808

Comment

No Comments

Post Your Comment


(Smile) (Wink) (Laugh) (Foot in mouth) (Frown) (Gasp) (Cool) (Tongue)

*は入力必須です。E-Mailは公開されません。