Ini catatan lanjutan dari panduan VMware,
saya mengikuti petunjuk instalasi menggunakan open-vm-tools
.
# yum -y install open-vm-tools open-vm-tools-devel
Tapi ketika mencoba untuk mount shared folder, vmhgfs tidak dikenali. Ahh, ini pasti ada yang kurang.
Lalu, di petunjuk kedua panduan VMware ada kalimat seperti ini :
1. Add the vmhgfs Driver
If you use the file sharing feature by using Shared Folders in VMware Workstation and Fusion, install the vmhgfs driver in the virtual machine. This driver is not included inbox in the operating system. Installing the additional vmhgfs driver does not disturb the other inbox VMware drivers or Open VMware Tools. To install this driver:
1. Install Open VMware Tools.
2. Install the traditional TAR Format VMware Tools that is bundled with VMware Workstation or Fusion products.
Tapi lagi-lagi tidak dijelaskan, darimana download VMware Tools
tersebut. Oke deh, setelah googling lagi, saya mendapat daftar files di situs vmware. Dari daftar files tersebut saya ambil yang terbaru di folder https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/8.1.1/3771013/packages/.
Saya mulai langkah-langkah instalasi manual vmware-tools dari sini.
Install Dev Tools
Untuk instalasi manual, butuh program program dan library dasar dari CentOS :
# yum -y groupinstall "Development Tools"
Install VMware-Tools
Instalasi vmware-tools ini lumayan simpel, saya mulai dari download dan mounting iso file :
# wget https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/8.1.1/3771013/packages/com.vmware.fusion.tools.linux.zip.tar
# tzr xfv com.vmware.fusion.tools.linux.zip.tar
# unzip com.vmware.fusion.tools.linux.zip
# mkdir -p /mnt/cdrom
# mount -t iso9660 -o loop payload/linux.iso /mnt/cdrom
# tar zxfv /mnt/cdrom/VMwareTools-10.0.6-3595377.tar.gz
# cd vmware-tools-distrib/
# mkdir -p /mnt/hgfs
Oke, sekarang kita ada di folder vmware-tools-distrib
dan tinggal menjalankan vmware-install.pl
. Didalam proses ini,
ada beberapa pertanyaan yang ketika mengikuti default value nya juga bakal aman-aman saja ;)
# ./vmware-install.pl
The installer has detected an existing installation of open-vm-tools on this
system and will not attempt to remove and replace these user-space
applications. It is recommended to use the open-vm-tools packages provided by
the operating system. If you do not want to use the existing installation of
open-vm-tools and attempt to install VMware Tools, you must uninstall the
open-vm-tools packages and re-run this installer.
The packages that need to be removed are:
open-vm-tools
The installer will next check if there are any missing kernel drivers. Type yes
if you want to do this, otherwise type no [yes] yes
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 10.0.6 build-3595377 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 file /usr/bin/vmware-hgfsclient that this program was about to install
already exists. Overwrite? [no]
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]
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 "/bin/gcc".
The path "/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.10.0-327.28.3.el7.x86_64/build/include".
The path "/lib/modules/3.10.0-327.28.3.el7.x86_64/build/include" appears to be
a valid path to the 3.10.0-327.28.3.el7.x86_64 kernel headers.
Would you like to change it? [no]
Using kernel build system.
make: Entering directory `/tmp/modconfig-3CMkqI/vmhgfs-only'
/bin/make -C /lib/modules/3.10.0-327.28.3.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-327.28.3.el7.x86_64'
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/message.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/dir.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/rpcout.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/filesystem.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/cpName.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/link.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/request.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/stubs.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/file.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/bdhandler.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/transport.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/module.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/super.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/fsutil.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/hgfsBd.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/page.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/backdoorGcc64.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/backdoor.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/hgfsEscape.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/inode.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/dentry.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/cpNameLite.o
CC [M] /tmp/modconfig-3CMkqI/vmhgfs-only/kernelStubsLinux.o
LD [M] /tmp/modconfig-3CMkqI/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-3CMkqI/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/modconfig-3CMkqI/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.0-327.28.3.el7.x86_64'
/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-3CMkqI/vmhgfs-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-3CMkqI/vmhgfs-only'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/modconfig-3CMkqI/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)
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]
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 10.0.6 build-3595377 for Linux for this
running kernel completed successfully.
Enjoy,
--the VMware team
Oke instalasi vmware-tools
selesai. Untuk memeriksa apakah service-nya sudah berjalan dengan baik, bisa di check seperti ini :
Check kernel module
# lsmod | grep hgfs
vmhgfs 54320 1
Check service
# systemctl status vmware-tools
● vmware-tools.service - SYSV: Manages the services needed to run VMware software
Loaded: loaded (/etc/rc.d/init.d/vmware-tools)
Active: active (exited) since Sat 2016-09-10 11:16:28 UTC; 47min ago
Docs: man:systemd-sysv-generator(8)
Sep 10 11:16:28 localhost.localdomain systemd[1]: Starting SYSV: Manages the services needed to run VMware software...
Sep 10 11:16:28 localhost.localdomain vmware-tools[869]: Checking acpi hot plug[ OK ]
Sep 10 11:16:28 localhost.localdomain vmware-tools[869]: Starting VMware Tools services in the virtual machine:
Sep 10 11:16:28 localhost.localdomain vmware-tools[869]: Switching to guest configuration:[ OK ]
Sep 10 11:16:28 localhost.localdomain vmware-tools[869]: Guest filesystem driver:[ OK ]
Sep 10 11:16:28 localhost.localdomain vmware-tools[869]: Mounting HGFS shares:[ OK ]
Sep 10 11:16:28 localhost.localdomain systemd[1]: Started SYSV: Manages the services needed to run VMware software.
Check shared folder
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 8.5G 2.4G 6.2G 28% /
devtmpfs 353M 0 353M 0% /dev
tmpfs 363M 0 363M 0% /dev/shm
tmpfs 363M 5.1M 358M 2% /run
tmpfs 363M 0 363M 0% /sys/fs/cgroup
/dev/sda1 497M 165M 333M 34% /boot
.host:/ 465G 221G 244G 48% /mnt/hgfs
tmpfs 73M 0 73M 0% /run/user/0
Shared folder .host:/
otomatis di mount di /mnt/hgfs
Pastikan service vmware-tools
tersebut enabled
:
# systemctl enable vmware-tools
vmware-tools.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig vmware-tools on
Proses tersebut selesai dan semua berjalan sebagaimana mestinya, sekarang waktunya bersih-bersih :
# cd ..
# rm -Rfv com.vmware.fusion.tools.linux.zip*
# rm -fv descriptor.xml
# rm -fv manifest.plist
# umount /mnt/cdrom
# rm -Rfv payload
Jika ada problem ketika update kernel, kita bisa masuk lagi ke folder vmware-tools-distrib
dan menjalankan vmware-install.pl
lagi.