Vmware ESXiでもVmware Fusionでも同じですが、Vmware toolsをゲストOSに入れることにより各種ドライバー等が入り最適化されます。WindowsのゲストOSであればマウントしてEXEをクリックしインストールできますがLinuxの場合は少々手順があるため、インストール方法を記載します。今回はCentos系のゲストOSが対象です。
Vmware toolsのインストール
Vmware fusionの場合はゲストOSを選択しメニューバーから「仮想マシン」->「VMware Toolsのインストール」をクリックします。
※ESXiを利用している場合は、Vmware VsphereクライアントからESXiサーバーに接続後仮想マシンを右クリックし ゲスト→Vmware toolsのインストール/アップグレードを選択します。
この状態で、マウントされたイメージをコピーしてインストール作業に入ります。
CDマウント用ディレクトリを作成しマウントする
mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom
mount: ブロックデバイス /dev/sr0 は書き込み禁止です、読込み専用でマウントします
マウントした場所から一時領域にファイルをコピー
※Vmwaretooks-xxxxxのバージョン名は利用しているVmwareによって異なります。
cp /mnt/cdrom/VMwareTools-8.8.4-730257.tar.gz /tmp/VMwareTools.tar.gz
コピーし終わったのでアンマウント
umount /mnt/cdrom/
ファイルをコピーしたディレクトリへ移動しファイルを展開
cd /tmp/ tar zxvf VMwareTools.tar.gz
展開されたディレクトリへ移動しPerlスクリプトを実行
cd vmware-tools-distrib/ ./vmware-install.pl
今後は基本的に全てEnterを押してすすめてしまって問題無い
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? [fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][/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] The path "/usr/lib/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][yes] 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 8.8.4 build-730257 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] Initializing... Making sure services for VMware Tools are stopped. [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] Found a compatible pre-built module for vmci. Installing it... Found a compatible pre-built module for vsock. Installing it... The module vmxnet3 has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=vmxnet3 to override. The module pvscsi has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=pvscsi to override. The module vmmemctl has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=vmmemctl to override. The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] Found a compatible pre-built module for vmhgfs. Installing it... Found a compatible pre-built module for vmxnet. Installing it... Found a compatible pre-built module for vmblock. Installing it... !!! [EXPERIMENTAL] !!! VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot they are not already present. By selecting yes, you will be enabling this experimental feature. You can always disable this feature by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] No X install found. Creating a new initrd boot image for the kernel. vmware-tools start/running The configuration of VMware Tools 8.8.4 build-730257 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 "/usr/bin/vmware-toolbox-cmd" from the command line or by invoking "/usr/bin/vmware-toolbox" from the command line 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. Enjoy, --the VMware team
インストール後の確認
VMware Toolsインストールバージョンの確認
/usr/bin/vmware-toolbox-cmd -v
8.8.4.13798 (build-xxxxxx)
ステータスの確認
status vmware-tools vmware-tools start/running
問題が無いようであればOSを再起動
reboot
Vmware Toolsが起動しない場合のトラブルシューティング
ステータスの確認
status vmware-tools
vmware-tools stop/waiting となっている場合何らかの原因で自動起動していません。
vmware-toolsの手動起動してみる
start vmware-tools
start: Job failed to start とでる場合は手動実行も出来ない状態となります。その場合、 コンフィグスクリプトを再度実行
/usr/bin/vmware-config-tools.pl
ほとんどの問題はコンフィグスクリプトの再実行で改善されます。
[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]