Archive for the 'VMware' Category

Linux From Scratch:仮想マシンにハードディスクを追加

いまVMwareのUbuntuには/dev/sda1が1つだけある。
LFS用のパテーションを追加するためにハードディスクを仮想的に追加する。
そのためにまずは仮想マシンをパワーオフにする。
Ubuntuのメニューから、システム>終了>シャットダウン

次にVMware Playerのメニューから、仮想マシンの設定>ハードウェアで
追加ボタンを押す。


ハードウェアの種類:ハードディスク
次へボタンを押す。
仮想ディスクの新規作成
ディスク:仮想ディスクの新規作成
次へボタンを押す。
仮想ディスクタイプ:SCSI(推奨)
仮想ディスクタイプ:SCSI(推奨)
次へボタンを押す。
ディスクの最大サイズを指定
ディスク最大サイズ:10.0GB
次へボタンを押す。
ディスクファイル名を入力
ディスク ファイル:LFS.vmdk
完了ボタンを押す。
追加されたハードディスク
ハードディスクが追加された。

仮想マシンを起動し、SCSIハードディスクが追加されていることを確認する。

$ ls /dev/ds*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb
※追加されたハードディスクは/dev/sdbである。

VMWare用のOSイメージを取得できるサイト

いつもドメイン名を忘れるのでココにメモ。

VMWare用のOSイメージを取得できるサイトです。

http://www.vmware.com/appliances/directory/

LinuxのOSイメージもたくさんあります。

動作検証などのために各種ディストリビューションの環境を作成したいときに便利。

CentOS:ゲストOSにvmware-toolsをインストール

CentOS5.3のイメージにvmware-toolsを入れようとして詰まったこと。
インストールはあっさりできたのに。

クリップボードの共有ができない&ユニティ機能が有効にならない


問題なくインストが終わったように見えるのに実際はウィンドウのリサイズとHGFSが使えるようになっただけ。

肝心のクリップボードの共有&ユニティ機能使えない。

CentOS5.3に特有な問題なのだろうか、とあきらめかけたが天啓があって解決した。

天啓:kernel-develが無いんじゃないの?
# vmware-toolsをアンインストール
/usr/bin/vmware-uninstall-tools.pl
# kernel-develをインストール
yum install kernel-devel
# おまじないてきに再起動
reboot

再起動後、もう一度vmware-toolsをインストールする。
./vmware-install.pl

きたよ!いままで↓こういうperfectlyなメッセージは出なかったけど、これで完璧なはず。
The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmmemctl module loads perfectly into the running kernel.

直ちに、クリップボード共有を有効にするにはコマンドで
/usr/bin/vmware-user

またはログアウト&ログイン。Xセッションの再起動。

vmxnetを有効にするには
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

以下が今回のインストールの内容。
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

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/rc.d]

What is the directory that contains the init scripts?
[/etc/rc.d/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-tools]

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

The path “/usr/share/doc/vmware-tools” 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 Tools 7.8.5 build-156735 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-tools.pl”.

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

The answer “]” is invalid. It must be one of “y” or “n”.

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


Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ OK ]
Virtual Printing daemon: [ OK ]
The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmmemctl module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmhgfs module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmxnet module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmblock module loads perfectly into the
running kernel.

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?
[no]

The bld-2.6.18-8.el5-i686smp-RHEL5xn--vmci module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5xn--vsock module loads perfectly into the
running kernel.



Detected X.org version 7.1.


Please choose one of the following display sizes that X will start with (1xn--
29):

[1] “320×200″
[2] “320×240″
[3] “400×300″
[4] “512×384″
[5] “640×400″
[6] “640×480″
[7] “720×480″
[8] “800×480″
[9] “854×480″
[10] “720×576″
[11]< "800x600"
[12] "1024x768"
[13] "1280x720"
[14] "1280x768"
[15] "1152x864"
[16] "1280x800"
[17] "1366x768"
[18] "1280x960"
[19] "1440x900"
[20] "1280x1024"
[21] "1400x1050"
[22] "1680x1050"
[23] "1600x1200"
[24] "1920x1080"
[25] "1920x1200"
[26] "1920x1440"
[27] "2048x1536"
[28] "2560x1600"
[29] "2560x1920"
Please enter a number between 1 and 29:

[11]


X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-53.1.14.el5PAE i686 Red Hat, Inc.
Current Operating System: Linux localhost.localdomain 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:19:18 EDT 2009 i686
Build Date: 21 January 2009
Build ID: xorg-x11-server 1.1.1-48.52.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.3042", Time: Tue Apr 21 20:50:57 2009
(++) Using config file: "/tmp/vmware-config0/XF86Config.3042"

X is running fine with the new config file.

FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: [ OK ]
Guest filesystem driver: [ OK ]
Mounting HGFS shares: [ OK ]
Guest memory manager: [ OK ]
Guest vmxnet fast network device: [ OK ]
VM communication interface: [ OK ]
VM communication interface socket family: [ OK ]
Blocking file system: [ OK ]
Guest operating system daemon: [ OK ]
Virtual Printing daemon: [ OK ]

The configuration of VMware Tools 7.8.5 build-156735 for Linux for this running
kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

If the virtual printer feature is enabled, you will need to restart the CUPS
service to make use of this feature.

Enjoy,

--the VMware team