UbuntuにVMware Toolsをインストールする
仮想マシンにインストールしたUbuntuに、「VMware Tools」をインストールします。「VMware Tools」をインストールすると、クリップボードの共有など、仮想マシンの使い勝手が向上します。
ここでは例として、仮想マシンにインストールした「Ubuntu 15.04 64bit版」に「VMware Tools」をインストールします。
ここでは、以下の流れで「VMware Tools」のインストール方法を紹介します。
- VMware Toolsのインストール準備
- VMware Toolsのインストール
注意
Ubuntu及びフレーバーでは、「open-vm-tools-desktop(open-vm-tools)」パッケージが提供されているので、この方法で「VMware Tools」をインストールせず、「open-vm-tools-desktop」をインストールしてください。「open-vm-tools-desktop」のインストールについては、「UbuntuにOpen VMware Toolsをインストールする」を参考にしてください。
1.VMware Toolsのインストール準備
「VMware Tools」のインストール準備です。1-1.Ubuntuの起動
仮想マシンを起動し、Ubuntuを起動します。1-2.build-essentialのインストール
「Ubuntuソフトウェアセンター」を起動し、「build-essential」で検索します。「インストール」ボタンをクリックします。
1-3.VMware Toolsディスクイメージのマウント
「Virtual Machine」メニューを開き、「Update VMware Tools」をクリックします。VMware Toolsディスクイメージがマウントされます。
環境によっては、「Install VMware Tools」や「Reinstall VMware Tools」と表示されます。
1-4.VMware Toolsアーカイブのコピー
「Nautilus」を起動し、仮想マシンのCD/DVDドライブの「VMware Tools」を開きます。「VMwareTools-10.0.0-2977863.tar.gz」ファイルが配置されているので、このファイルを適当な場所にコピーします。
ここでは例として、「~/ダウンロード」フォルダーにコピーしました。
1-5.アーカイブの展開
コピーしたVMware Toolsアーカイブファイルを右クリックし、表示されるメニューから「ここに展開する」をクリックします。1-6.アーカイブの展開完了
以下のように、アーカイブの中身が展開されます。1-7.カレントディレクトリーの変更準備
「端末」を起動し、以下のコマンドを入力します。
cd
ここではコマンドの入力だけ行います。
コマンドは実行しません。
「cd」の後ろの半角スペースの入力を忘れないでください。
1-8.パスの指定
続いて、「6.」のフォルダーを、「Nautilus」から「端末」へドラッグ&ドロップします。1-9.パスの設定完了
以下のように、インストーラーのパスが「端末」に入力されます。1-10.カレントディレクトリーの変更
「エンター」キーを入力し、カレントディレクトリーを変更します。2.VMware Toolsのインストール
「VMware Tools」のインストールです。2-1.インストーラーの起動
「端末」で、以下のコマンドを実行します。
sudo ./vmware-install.pl
2-2.パスワードの入力
インストーラーは「root」で実行する必要があるため、以下のようにパスワード入力を促される画面が表示されます。現在ログインしているユーザーのパスワードを入力して、「エンター」キーを押します。
パスワードを入力しても画面に何も反映されませんが、パスワードの入力は行われています。
2-3.インストール開始
インストーラーを起動すると、以下のように「VMware Tools」の設定や、インストールに関する質問が表示されます。よく分からなければ、「エンター」キーを押していけばよいです。
ここでは例として、以下の質問のみ「yes」を入力して「エンター」キーを押しています。
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no]
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no]
これは、VMwareのカーネルモジュール(ドライバー)を、ゲストOS起動時に必要に応じてインストールするかどうかの設定です。
2-4.インストール完了
以下のように、インストールが完了します。後は、仮想マシンを再起動してください。
以上で完了です。
インストールログ
参考までに、上記で「VMware Tools」をインストールした時のログです。
ubuntu@ubuntu-vm-1504:~/ダウンロード/vmware-tools-distrib$ sudo ./vmware-install.pl
[sudo] password for ubuntu:
open-vm-tools are available from the OS vendor and VMware recommends using
open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.
Do you still want to proceed with this legacy installer? [yes]
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes]
Uninstalling the tar installation of VMware Tools.
Stopping services for VMware Tools
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
VMware User Agent (vmware-user): done
Blocking file system: done
Unmounting HGFS shares: done
Guest filesystem driver: done
Stopping Thinprint services in the virtual machine:
Stopping Virtual Printing daemon: done
File /etc/pulse/default.pa is backed up to /etc/pulse/default.pa.old.4.
update-initramfs: Generating /boot/initrd.img-3.19.0-28-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-21-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-16-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-15-generic
The removal of VMware Tools 9.9.3 build-2759765 for Linux completed
successfully.
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]
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-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?
[yes]
In which directory do you want to install the common agent library files?
[/usr/lib]
In which directory do you want to install the common agent transient files?
[/var/lib]
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 10.0.0 build-2977863 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.
Stopping Thinprint services in the virtual machine:
Stopping Virtual Printing daemon: done
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
VGAuthService: done
VMware User Agent (vmware-user): done
Blocking file system: done
Unmounting HGFS shares: done
Guest filesystem driver: done
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.
The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.
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]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.19.0-28-generic/build/include".
The path "/lib/modules/3.19.0-28-generic/build/include" appears to be a valid
path to the 3.19.0-28-generic kernel headers.
Would you like to change it? [no]
make: Entering directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/3.19.0-28-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-3.19.0-28-generic'
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/message.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/dir.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/request.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/filesystem.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpName.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/rpcout.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/module.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/stubs.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsEscape.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/link.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/dentry.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/transport.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/inode.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/file.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/super.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/bdhandler.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/fsutil.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsBd.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/backdoorGcc64.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/page.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/backdoor.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpNameLite.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/kernelStubsLinux.o
LD [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-28-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment. Do you wish to enable this feature?
[yes]
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no] yes
Thinprint provides driver-free printing. Do you wish to enable this feature?
[yes]
Disabling timer-based audio scheduling in pulseaudio.
Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes]
Do you want to enable Common Agent (caf)? [yes]
Detected X server version 1.17.1
Distribution provided drivers for Xorg X server are used.
Skipping X configuration because X drivers are not included.
Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.19.0-28-generic
Generating the key and certificate files.
Successfully generated the key and certificate files.
Starting Virtual Printing daemon: done
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
VMware Automatic Kmods: done
Guest filesystem driver: done
Mounting HGFS shares: done
Blocking file system: done
VMware User Agent: done
Guest operating system daemon: done
VGAuthService: done
Common Agent: done
The configuration of VMware Tools 10.0.0 build-2977863 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.
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
[sudo] password for ubuntu:
open-vm-tools are available from the OS vendor and VMware recommends using
open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.
Do you still want to proceed with this legacy installer? [yes]
A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes]
Uninstalling the tar installation of VMware Tools.
Stopping services for VMware Tools
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
VMware User Agent (vmware-user): done
Blocking file system: done
Unmounting HGFS shares: done
Guest filesystem driver: done
Stopping Thinprint services in the virtual machine:
Stopping Virtual Printing daemon: done
File /etc/pulse/default.pa is backed up to /etc/pulse/default.pa.old.4.
update-initramfs: Generating /boot/initrd.img-3.19.0-28-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-21-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-16-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-15-generic
The removal of VMware Tools 9.9.3 build-2759765 for Linux completed
successfully.
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]
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-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?
[yes]
In which directory do you want to install the common agent library files?
[/usr/lib]
In which directory do you want to install the common agent transient files?
[/var/lib]
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 10.0.0 build-2977863 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.
Stopping Thinprint services in the virtual machine:
Stopping Virtual Printing daemon: done
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
VGAuthService: done
VMware User Agent (vmware-user): done
Blocking file system: done
Unmounting HGFS shares: done
Guest filesystem driver: done
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.
The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.
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]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.19.0-28-generic/build/include".
The path "/lib/modules/3.19.0-28-generic/build/include" appears to be a valid
path to the 3.19.0-28-generic kernel headers.
Would you like to change it? [no]
make: Entering directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/3.19.0-28-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-3.19.0-28-generic'
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/message.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/dir.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/request.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/filesystem.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpName.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/rpcout.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/module.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/stubs.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsEscape.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/link.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/dentry.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/transport.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/inode.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/file.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/super.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/bdhandler.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/fsutil.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/hgfsBd.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/backdoorGcc64.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/page.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/backdoor.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/cpNameLite.o
CC [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/kernelStubsLinux.o
LD [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/modconfig-Aw6bZo/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-28-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory '/tmp/modconfig-Aw6bZo/vmhgfs-only'
The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment. Do you wish to enable this feature?
[yes]
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no] yes
Thinprint provides driver-free printing. Do you wish to enable this feature?
[yes]
Disabling timer-based audio scheduling in pulseaudio.
Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes]
Do you want to enable Common Agent (caf)? [yes]
Detected X server version 1.17.1
Distribution provided drivers for Xorg X server are used.
Skipping X configuration because X drivers are not included.
Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.19.0-28-generic
Generating the key and certificate files.
Successfully generated the key and certificate files.
Starting Virtual Printing daemon: done
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
VMware Automatic Kmods: done
Guest filesystem driver: done
Mounting HGFS shares: done
Blocking file system: done
VMware User Agent: done
Guest operating system daemon: done
VGAuthService: done
Common Agent: done
The configuration of VMware Tools 10.0.0 build-2977863 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.
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