Apr 05, 2006
[VMWare] Virtual Server 2005 にチャレンジ
Virtual Server とは
Virtual Server は Microsoft 製の仮想化ソフト。 VMWare と同種のソフトウェア。 今は Microsoft 製品だけれど Virtual PC 同様 Microsoft に買収された Connectix が開発したもの。 VMWare で特に困ったことはないが、最近フリーで公開されたので試してみることに。
- Download or Order Virtual Server 2005 R2 Enterprise Edition for Free
- http://www.microsoft.com/windowsserversystem/virtualserver/software/default.mspx
- Virtual Server 2005 R2 Software Download Registration
- http://www.microsoft.com/windowsserversystem/virtualserver/software/privacy.mspx
Virtual Server のインストール
- ダウンロードページへ行く。
- "Change Language" で言語を日本語に変更する。
- "32 ビット X86 実行可能ファイル" というリンクからバイナリ("setup.exe")をダウンロードする。
- "setup.exe" を実行するとインストーラが起動する。
Virtual Machine の作成
Virtual Server は入ったが、Virtual Machine の作成方法が分からない。 ファーストステップガイドを読んでみたところ「バーチャル マシンを作成するには、管理 Web サイトを開きます。」と書かれていた。 どうやら「Virtual Server Web アプリケーション」が無ければ Virtual Machine を作成できないらしい。 色々調べてみたが他の Virtual Machine 作成方法は見つからなかった。 IIS はインストールしたくないので、ここで断念。 CUI のツールを用意して欲しいな。
Mar 04, 2006
[VMWare] VMWare と Xen の違い
VMWare と Xen はどちらも仮想化ソフト。 同じ仮想化ソフトではあるけれど、仮想化の実現方式は結構異なるらしい。 Interview on Xen with Manuel Bouyerで Xen と VMWare の実装の違いが紹介されていた (vimrc diaryさんのXenとVmwareの違い [xen]経由)。
VMware will emulate real hardware so that an unmodified OS can run on top of the virtualizer. Just run an OS in VMware, and this OS will see some kind of VGA adapter for the console along with the usual PS/2 keyboards and mouse, some kind of network interface (a DEC tulip if my memory is right), and some kind of IDE or SCSI adapter for mass storage. To achieve this, the virtualizer will have to emulate these devices. This means emulating the registers and interrupts, quite often with MMU faults when these fake registers are accessed. This means that a single I/O operation will most likely require several context switches. The same goes for the MMU: accesses to privileged CPU registers, page tables and use of privileged instruction will all generate context switches.
The Xen's virtualizer (the hypervisor) doesn't emulate real hardware but offers an interface to the guest OS for these operations. This means that the guest OS will have to be modified to use these interfaces. But then these interfaces can be optimized for the task, allowing it to batch large numbers of operations in a single communication with the hypervisor, and so limiting the number of context switches required for I/O or MMU operations.
ということは、VMWare より Xen の方が高速なのだろうか?? 調べてみると、Xen のサイトに Xen と VMWare のパフォーマンスの比較が載っていた。 確かに、VMWare より Xen の方が高速の様だ。 とは言え、気軽に使うには普通の OS がそのままゲスト OS として使用できる VMWare の方が楽なので、個人的には VMWare を使っていくつもり。
ついでに少し調べていたら仮想化技術の実現方式の違いを解説したページを発見した。
- 仮想化技術のアプローチと実装 ~ VMwareから要注目技術Xenまで ~
- http://www.atmarkit.co.jp/flinux/special/vm/vm02.html
Feb 08, 2006
[VMWare] VMWare Player on Debian Sarge インストールメモ:
Debian Sarge に VMWare Player をインストールしたときのメモ。 大した障害はなかったが、Windows 版の様にインストーラ一発で終了、というわけには行かなかった。
インストール手順
- (もしインストールされていなければ) X Window System をインストール。X は VMWare Player の実行に必須の様だ。
# apt-get install x-window-system
- カーネルのバージョンに合わせてカーネルのヘッダファイルをインストールする。
# apt-get install kernel-headers-2.4.27-2-386 パッケージリストを読みこんでいます... 完了 依存関係ツリーを作成しています... 完了 以下の特別パッケージがインストールされます: kernel-headers-2.4.27-2 以下のパッケージが新たにインストールされます: kernel-headers-2.4.27-2 kernel-headers-2.4.27-2-386 アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。 2120kB のアーカイブを取得する必要があります。 展開後に追加で 29.8MB のディスク容量が消費されます。 続行しますか? [Y/n]
- ここから Linux 版の VMWare Player をダウンロード。ここでは VMware-player-1.0.1-19317.tar.gz を使う
- VMWare Player のインストーラを実行して、インストールと初期設定を行う。
# tar zxvf ./VMware-player-1.0.1-19317.tar.gz # ./vmware-player-distrib/vmware-install.pl Creating a new installer database using the tar3 format. Installing the content of the package. 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 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] yes 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 The installation of VMware Player 1.0.1 build-19317 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 Player 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] yes The correct version of one or more libraries needed to run VMware Player may be missing. This is the output of ldd /usr/bin/vmware: libm.so.6 => /lib/libm.so.6 (0x4001c000) libdl.so.2 => /lib/libdl.so.2 (0x4003e000) libpthread.so.0 => /lib/libpthread.so.0 (0x40041000) libX11.so.6 => not found libXtst.so.6 => not found libXext.so.6 => not found libXt.so.6 => not found libICE.so.6 => not found libSM.so.6 => not found libXrender.so.1 => not found libz.so.1 => /usr/lib/libz.so.1 (0x40094000) libc.so.6 => /lib/libc.so.6 (0x400a6000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) This program cannot tell for sure, but you may need to upgrade libc5 to glibc before you can run VMware Player. Hit enter to continue. Making sure services for VMware Player are stopped. Stopping VMware services: Virtual machine monitor done You must read and accept the End User License Agreement to continue. Press enter to display it. (snip) 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] The path "/usr/share/icons" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] yes What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications] In which directory do you want to install the application's icon? [/usr/share/pixmaps] Trying to find a suitable vmmon module for your running kernel. None of the pre-built vmmon modules for VMware Player is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes] yes Using compiler "/usr/bin/gcc". Use environment variable CC to override. What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include] /usr/src/kernel-headers-2.4.27-2-386/include Extracting the sources of the vmmon module. Building the vmmon module. Using standalone build system. make: Entering directory `/tmp/vmware-config0/vmmon-only' make[1]: Entering directory `/tmp/vmware-config0/vmmon-only' make[2]: Entering directory `/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-386' make[2]: Leaving directory `/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-386' make[2]: Entering directory `/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-386' make[2]: Leaving directory `/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-386' make[1]: Leaving directory `/tmp/vmware-config0/vmmon-only' make: Leaving directory `/tmp/vmware-config0/vmmon-only' The module loads perfectly in the running kernel. Do you want networking for your virtual machines? (yes/no/help) [yes] yes Configuring a bridged network for vmnet0. The following bridged networks have been defined: . vmnet0 is bridged to eth0 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] no Extracting the sources of the vmnet module. Building the vmnet module. Using standalone build system. make: Entering directory `/tmp/vmware-config0/vmnet-only' make: Leaving directory `/tmp/vmware-config0/vmnet-only' The module loads perfectly in the running kernel. Would you like to enable the Google searchbar? (yes/no) [no] Starting VMware services: Virtual machine monitor done Virtual ethernet done Bridged networking on /dev/vmnet0 done The configuration of VMware Player 1.0.1 build-19317 for Linux for this running kernel completed successfully. You can now run VMware Player by invoking the following command: "/usr/bin/vmplayer". Enjoy, --the VMware team #
- 後は、「X が起動した状態で」VMWare Player を起動する。
Feb 07, 2006
[VMWare] VMWare Server にチャレンジ
VMWare Server のフリー版が公開されたので、早速チャレンジ。 ダウンロードのためのユーザ登録で、"State/Province"を選択しないとダウンロードサイトが Internal Server Error になることに気付くのに時間が掛かった以外は特に問題なく進んだ。 窓の杜に書いてあるのに・・・気付けよ > 自分
- VMWare Server ダウンロードページ
- http://www.vmware.com/download/server/
- VMware Server Documentation
- http://www.vmware.com/support/pubs/server_pubs.html
- Installing the Beta
- http://www.vmware.com/support/server/doc/releasenotes_server_beta.html#install
- 窓の杜 - VMware、仮想PC作成・実行ソフトのサーバー版「VMware Server」を無償公開
- http://www.forest.impress.co.jp/article/2006/02/06/vmwareserver.html
VMWare Server インストールメモ
VMWare Server のインストールに関してメモ。
VMWare Player のセッションもそのまま引き継げて、かなり良い感じ。Jan 18, 2006
[VMWare] Samba + LDAP の VMware 仮想ディスク(2)
実際に試してみた。 まずは起動と Samba へのアクセスに挑戦。
- VMWare Player を起動
- root/samba でログイン
- ifconfig で IP アドレスを調べる
- Windows からエクスプローラでアクセス
- ldap01/ldap01 で認証
- 問題無く Samba に接続。ファイルの読み書きも問題無し
![[Samba へ無事接続]](/blog/entries/VMWare/20060118_01/samba.png)
次にドメインへの参加に挑戦。 ・・・ここで問題発生。 色々試してはみたもののドメインには参加できなかった。 クライアントは Windows XP Professional。 ローカルセキュリティポリシーとかも調整したが無理だった。 Samba の勉強が必要か。 とりあえず今回は時間が無いので断念。
Jan 17, 2006
[VMWare] Samba + LDAP の VMware 仮想ディスク
hard で loxse な日々さんがSamba + LDAP の VMware 仮想ディスクを紹介していた。 公開元のだめだめ日記さんによると・・・
というものらしい。素晴らしい!! 「ActiveDirectory までは別に要らないなぁ」という場合に何とも便利。 試してみたいのだが、ダウンロードが終わらない・・・後 4 時間orz 明日試してみよう。です。
- Samba+LDAPでPDCの構成済
- smbldap-tools設定済
- Windowsから管理するための設定済
- UNIXとWindowsのアカウント同期設定済
ベースは Debian GNU/Linux 3.1(Sarge) です。base-system に最低限 Samba+LDAPを動作させるのに必要なパッケージ+αを入れることで、200MB程度の容量に抑えました。
Nov 20, 2005
[VMWare] VMWare Player のサービス停止
Windows XP Professiona に VMWare Player をインストールしたら、ログイン後の処理にやたらと時間がかかるようになった気がする。 タスクマネージャでプロセスを見てみると、
- vmnat
- vmnetdhcp
- vmware-authd
とりあえず↓の様なバッチを作って必要なときに起動するようにした。 しばらくこれで様子を見てみよう。
startVMWareService.bat
stopVMWareService.batnet start "VMWare Authorization Service" net start "VMWare DHCP Service" net start "VMWare NAT Service"
net stop "VMWare NAT Service" net stop "VMWare DHCP Service" net stop "VMWare Authorization Service"
Nov 04, 2005
[VMWare] VMWare Player にチャレンジ
VMWare Player とは
PC エミュレータの VMWare に、無償版の VMWare Player があるらしい。 "Player" と銘打っているだけあって仮想イメージを作成する機能がなく、実際に利用するためには仮想イメージを作成できる製品版の VMWare Workstation が必要とのこと。
でも、逃げ道があった。→ 本当に無償で使える「VMware Player」 素晴らしい!! というわけで早速チャレンジ。
VMWare Player のインストール
↑の "Weboo! Returns" さんの説明通りで困ることも無くさくっと終了。
追加で調べたところだけ少しメモ。
qemu-img のコマンド
仮想イメージの作成に利用する QEMU のコマンド qemu-img について。
>qemu-img create -f vmdk d:\debian-sarge.vmdk 4G
qemu-img で指定できるコマンド
- create
- commit
- convert
- info
対応ファイルフォーマット
create 時に -f オプションで指定可能なファイルフォーマットは
- raw
- Raw disk image format (default).
- qcow
- QEMU image format, the most versatile format.
- cow
- User Mode Linux Copy On Write image format.
- vmdk
- VMware 3 and 4 compatible image format.
- cloop
- Linux Compressed Loop image, useful only to reuse directly compressed CD-ROM images present for example in the Knoppix CD-ROMs.
qemu-img info
仮想イメージの情報を表示するコマンドは何故か動作しなかった(エラーで落ちる)。
>qemu-img info -f vmdk d:\debian-sarge.vmdk
仮想イメージの複数登録
仮想イメージを複数登録する場合、以下の手順で行う (OS は Debian を想定)。
- 新しいイメージを作成。
>qemu-img create -f vmdk d:\debian-sarge2.vmdk 10G
- debian-sarge.vmx に以下を追加(/deb/hdb に追加する場合)。
ide0:1.present = "TRUE" ide0:1.fileName = "debian-sarge2.vmdk"
- Debian を起動
- /deb/hdb の primary 1 にパーティション(タイプは Linux)を作成。
#fdisk /dev/hdb
- EXT3 でパーティションをフォーマット。
#mke2fs -j /dev/hdb1
- 作成したパーティションをテストする。
#mkdir /mnt/test #mount -t ext3 /dev/hdb1 /mnt/test #umount /mnt/test #rmdir /mnt/test
ゲスト OS あれこれ
指定可能な questOs
Galileo Computing さんによると、vmx ファイルの guestOS の値は以下のものが利用できるらしい。
Guest OS 名 | vmx の guestOS |
---|---|
Windows Server 2003 Standard Edition | winnetstandard |
Windows XP Professional | winxppro |
Windows 2000 Professional | win2000Pro |
Red Hat Linux (generic) | redhat |
SuSE Linux (generic) | suse |
Netware 5 | netware5 |
Netware 6 | netware6 |
Solaris 9 | solaris9 |
Solaris 10 (experimental) | solaris10 |
FreeBSD (generic) | freebsd |
Other Linux | otherlinux |
Other Linux 2.4x kernel | other24xlinux |
Other Linux 2.6x kernel | other26xlinux |
ゲスト OS のインストール時メモ
というわけで色々なゲスト OS を入れてみたので、そのときのメモ。 全て最小インストールを選択し、X Window などの GUI はインストールしていない。 インストールは全て Daemon Tools で直接 ISO をマウントして行った。
- Debian Sarge
- questOs="other24xlinux" でインストールは何事もなく終了。"apt-get install kernel-image-2.6.8-2-386" をしてみたが問題なく動作した。Kernel のアップデート前から
atkbd.c: Unknown key released (translated set 2, code 0x01 on isa0060/serio0). atkbd.c: Use 'setkeycodes e001
というエラーが出る。Kernel アップデート後も変わらず。但し、コンソール上にエラーが表示されるだけで実害はナシ。なんだろう、これ??' to make it known.
- Solaris 10
- questOs="solaris10" でインストールは何事もなく終了。DHCP クライアントでネットワークの設定を行うと、ホスト名が正常に設定されない。修正方法は
- /etc/nodename にホスト名(FQDN)を書く
- /etc/hostname.pcn0 にホスト名を書く
- #uname -S ホスト名
- #reboot
- Fedora Core4
- questOs="other26xlinux" でインストールは何事もなく終了。その後も特に問題なし。guestOs="redhat" もあるけれど、どちらが良いのだろう??
- FreeBSD 5.4
- questOs="freebsd" でインストールは何事もなく終了。ホスト名、ネットワークは /etc/rc.conf に以下の通り設定した。
hostname=ホスト名 ifconfig.lnc0="dhcp"