VMware Workstation 11上にCentOS 7の仮想マシンを作成してVMware Toolsをインストールしてみました。
環境
・VMware Workstation 11(11.1.2 build-2780323)
・CentOS 7(CentOS-7-x86_64-DVD-1503-01.iso)
・最小限のインストール+開発ツール
- CentOS 7を起動
- VMware Toolsをマウント
- VMware Toolsを解凍
- インストールスクリプトの実行
- ifconfigをインストール
- vmware-install.plの実行
CentOS 7を起動してVMware Workstationメニューの[VM]-[VMwareToolsのインストール(T)]をクリックします。
VMware Tools CDをマウントします。
1 2 |
[root@host01 ~]# mount -t iso9660 /dev/cdrom /media mount: /dev/sr0 is write-protected, mounting read-only |
/usr/local/srcにVMware Toolsを解凍します。
1 2 3 4 5 6 |
[root@host01 ~]# cd /usr/local/src [root@host01 src]# tar xvfz /media/VMwareTools-9.9.3-2759765.tar.gz vmware-tools-distrib/ vmware-tools-distrib/etc/ vmware-tools-distrib/etc/tpvmlp.conf (snip) |
vmware-install.plを実行します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
[root@host01 src]# cd vmware-tools-distrib/ [root@host01 vmware-tools-distrib]# ls -l 合計 468 -rw-r--r--. 1 root root 269196 5月 23 06:44 FILES -rw-r--r--. 1 root root 2538 5月 23 06:43 INSTALL drwxr-xr-x. 2 root root 84 5月 23 06:43 bin drwxr-xr-x. 2 root root 64 5月 23 06:43 doc drwxr-xr-x. 5 root root 4096 5月 23 06:43 etc drwxr-xr-x. 2 root root 87 5月 23 06:43 installer drwxr-xr-x. 15 root root 4096 5月 23 06:43 lib -rwxr-xr-x. 1 root root 196237 5月 23 06:43 vmware-install.pl [root@host01 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] 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 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 9.9.3 build-2759765 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] Setup is unable to find the "ifconfig" program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand? [yes] |
“ifconfig”プログラムが見当たらない。自分で場所を指定しますか?だって。
なるほどCentOS 7からはifconfigからipコマンドに変更になっているので、最小構成だとifconfigがインストールされていないのですね。
vmware-install.plを強制終了してifconfigをインストールします。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@host01 vmware-tools-distrib]# yum search all ifconfig 読み込んだプラグイン:fastestmirror base | 3.6 kB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 (1/4): base/7/x86_64/group_gz | 154 kB 00:00 (2/4): extras/7/x86_64/primary_db | 54 kB 00:00 (3/4): base/7/x86_64/primary_db | 5.1 MB 00:01 (4/4): updates/7/x86_64/primary_db | 1.8 MB 00:01 Determining fastest mirrors * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp ================================ 一致: ifconfig ================================ net-tools.x86_64 : Basic networking tools |
ifconfigはnet-toolsに含まれているようです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
[root@host01 vmware-tools-distrib]# yum -y install net-tools 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ net-tools.x86_64 0:2.0-0.17.20131004git.el7 を インストール --> 依存性解決を終了しました。 依存性を解決しました ================================================================================ Package アーキテクチャー バージョン リポジトリー 容量 ================================================================================ インストール中: net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k トランザクションの要約 ================================================================================ インストール 1 パッケージ 総ダウンロード容量: 304 k インストール容量: 917 k Downloading packages: 警告: /var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.17.20131004git.el7.x86_64.rpm: ヘッダー V3 RSA/SHA256 Signature、鍵 ID f4a80eb5: NOKEY net-tools-2.0-0.17.20131004git.el7.x86_64.rpm の公開鍵がインストールされていません net-tools-2.0-0.17.20131004git.el7.x86_64.rpm | 304 kB 00:00 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 から鍵を取得中です。 Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>" Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 Package : centos-release-7-1.1503.el7.centos.2.8.x86_64 (@anaconda) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Running transaction check Running transaction test Transaction test succeeded Running transaction インストール中 : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 検証中 : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 インストール: net-tools.x86_64 0:2.0-0.17.20131004git.el7 完了しました! |
再度vmware-install.plを実行します。設定値は適宜置き換えて下さい。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
[root@host01 vmware-tools-distrib]# ./vmware-install.pl 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 (via systemctl): [ OK ] Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done 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/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? [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 9.9.3 build-2759765 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 (via systemctl): [ OK ] 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] no 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] NOTICE: It appears your system does not have the required fuse packages installed. The VMware blocking filesystem requires the fuse packages and its libraries to function properly. Please install the fuse or fuse-utils package using your systems package management utility and re-run this script in order to enable the VMware blocking filesystem. 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 Do you want to enable Guest Authentication (vgauth)? [yes] no No X install found. Creating a new initrd boot image for the kernel. Starting Virtual Printing daemon: done Starting vmware-tools (via systemctl): [ OK ] The configuration of VMware Tools 9.9.3 build-2759765 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 |
念の為に再起動後、VMware Toolsの起動を確認します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@host01 ~]# ls -l /etc/init.d/ 合計 92 -rw-r--r--. 1 root root 1160 5月 13 04:44 README -rw-r--r--. 1 root root 13430 1月 15 17:57 functions -rwxr-xr-x. 1 root root 2989 1月 15 17:57 netconsole -rwxr-xr-x. 1 root root 6470 1月 15 17:57 network -rwxr-xr-x. 1 root root 41966 6月 21 12:10 vmware-tools -rwxr-xr-x. 1 root root 15433 6月 21 12:10 vmware-tools-thinprint [root@host01 ~]# chkconfig --list 注記: この出力は SysV サービスのみであり、ネイティブな systemd のサービスは含ま れていません。 systemd services. SysV 設定のデータはネイティブな systemd の設定によって上書きされます。 systemd サービスを一覧表示するには 'systemctl list-unit-files' を使用して ください。 特定のターゲットにおいて有効化されているサービスを確認するには、 'systemctl list-dependencies [target]' 。 netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off vmware-tools 0:off 1:off 2:on 3:on 4:on 5:on 6:off vmware-tools-thinprint 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@host01 ~]# /etc/init.d/vmware-tools status vmtoolsd is running [root@host01 ~]# ps ax | grep vmtoolsd 9900 ? Sl 0:02 /usr/sbin/vmtoolsd 10211 pts/0 S+ 0:00 grep --color=auto vmtoolsd |
VMware toolsのバージョン
1 2 |
[root@host01 ~]# vmware-toolbox-cmd -v 9.9.3.47419 (build-2759765) |