Install vmware tools for debian 8 in a virtual machine [manual]
With a full debian installation in VMWare, I had a constant hassle, because I never had vmware tools installed normally without a file to the end. Maybe my hands are not the same, I won’t argue - with Linux, I’m still not on you. Recently, a new version of debian was released and, on the second day after the official release, I made a strong-willed decision to transfer my virtual machines, which organize FTP / SFTP servers, from WindowsXP to Linux. Here the new version of VMWare 11 just arrived, the new version of tools, debian 8 testing was used by people for a long time and I decided that everything should be smooth and I would have to work hard and just figure out the proftpd settings. After installing and configuring debian 8, I decided to install vmware tools and thus complete the initial phase - preparing the base machine. And what do you think? VMware tools got crooked ...
This glaring fact did not leave me indifferent. How much is already possible? For example, Gnome3 on debian 7 started only in alternative mode and did not manage to properly install drivers for video and / or enable 3D support. I remember spending some time searching for a solution and trying out proposals for self-assembly, but it did not bring me success and I abandoned this business, especially since it did not interfere with work. But the feeling of underperformance remained.
And here, again, something is not right. The GUI started up normally. I even really liked Gnome3 after configuration (configuration via gnome-tweak-tool + additional extensions: Lock keys, Remove dropdown arrows). Tulsa are put almost normally. But ultimately we do not get the support of Shared Folders. This is sad because Such a mechanism is convenient: we connect folders in the virtual machine settings, they are automatically mounted in / mnt / hgfs /. And do not bother with sharing folders over the network in the host machine. But after installing the tools, we get the idle module vmhgfs. In RuNet, I did not find a solution, but I remember I found how to solve the problem in some English-language forum. This whole action took place on April 26-28. I was surprised when an acquaintance approached me yesterday and lamented that I couldn’t configure the VMware network in a virtual machine with a new debian.
So how to install tools.
First, install the necessary packages for building tools (this has been going on since prehistoric times, otherwise there is a risk that nothing will be collected normally):
If you then install the standard tools from VMWare:
Then, after the preload, we get the idle vmhgfs module. I quote the end of the installation log:
To resolve this sad problem, you need to perform a series of steps to replace d_alias with d_u.d_alias in the vmhgfs package:
After that, the Shared Folders functionality from VMWare will start working normally - in the / mnt / ngfs folder, connected folders will appear in the virtual machine settings.
NOTE: this method is not compatible with earlier kernel versions (below 3.13.0-45) !!!
After these corrections, I collected the tools back into the archive, from which you can now install the aces without bothering with additional steps to replace d_alias with d_u.d_alias. If someone needs me, I can upload the file. Tell me only where, the file weighs 178MB, I would like to put it on some kind of file hosting without registration and other troubles, so that it would lie there for a year or two at least.
In fairness, I think it should be noted that not only on tools from vmware the light came together in a wedge. There is a wonderful open-vm-tools project. The package, however, has not been updated for a long time, but at one time I managed it quite successfully and everything always worked right there. Besides open.
Also, good people suggest that there is still a convenient set of patches vmware-tools-patches .
This glaring fact did not leave me indifferent. How much is already possible? For example, Gnome3 on debian 7 started only in alternative mode and did not manage to properly install drivers for video and / or enable 3D support. I remember spending some time searching for a solution and trying out proposals for self-assembly, but it did not bring me success and I abandoned this business, especially since it did not interfere with work. But the feeling of underperformance remained.
And here, again, something is not right. The GUI started up normally. I even really liked Gnome3 after configuration (configuration via gnome-tweak-tool + additional extensions: Lock keys, Remove dropdown arrows). Tulsa are put almost normally. But ultimately we do not get the support of Shared Folders. This is sad because Such a mechanism is convenient: we connect folders in the virtual machine settings, they are automatically mounted in / mnt / hgfs /. And do not bother with sharing folders over the network in the host machine. But after installing the tools, we get the idle module vmhgfs. In RuNet, I did not find a solution, but I remember I found how to solve the problem in some English-language forum. This whole action took place on April 26-28. I was surprised when an acquaintance approached me yesterday and lamented that I couldn’t configure the VMware network in a virtual machine with a new debian.
So how to install tools.
First, install the necessary packages for building tools (this has been going on since prehistoric times, otherwise there is a risk that nothing will be collected normally):
sudo apt-get install linux-headers-$(uname -r) make gcc
If you then install the standard tools from VMWare:
mount the VMware tools cdrom and install VMware Tools
sudo mount /dev/cdrom /media/cdrom
tar xvzf /media/cdrom/VMwareTools-9.9.2-2496486.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl -d
Then, after the preload, we get the idle vmhgfs module. I quote the end of the installation log:
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: error executing the recipe for the target "/tmp/modconfig-zqp0EX/vmhgfs-only/inode.o"
make [4] : *** [/tmp/modconfig-zqp0EX/vmhgfs-only/inode.o] Error 1
make [4]: *** Waiting for tasks to complete ...
/usr/src/linux-headers-3.16.0-4-common / Makefile: 1350: error executing the recipe for the target "_module_ / tmp / modconfig-zqp0EX / vmhgfs-only"
make [3]: *** [_module_ / tmp / modconfig-zqp0EX / vmhgfs-only] Error 2
Makefile: 181: error executing the recipe for the target “sub-make”
make [2]: *** [sub-make] Error 2
Makefile: 8: error executing the recipe for the target “all”
make [1]: *** [all] Error 2
make [1]: exit the directory "/usr/src/linux-headers-3.16.0-4-amd64"
Makefile: 120: error executing the recipe for the target “vmhgfs.ko”
make: *** [vmhgfs.ko] Error 2
make: exiting the directory “/ tmp / modconfig-zqp0EX / vmhgfs-only”
The filesystem driver (vmhgfs module) is used only for the shared folder
feature. The rest of the software provided by VMware Tools is designed to work
independently of this feature.
If you wish to have the shared folders feature, you can install the driver by
running vmware-config-tools.pl again after making sure that gcc, binutils, make
and the kernel sources for your running kernel are installed on your machine.
These packages are available on your distribution's installation CD.
To resolve this sad problem, you need to perform a series of steps to replace d_alias with d_u.d_alias in the vmhgfs package:
#!/bin/sh -x
cd /usr/lib/vmware-tools/modules/source
tar xf vmhgfs.tar
grep -q d_u.d_alias vmhgfs-only/inode.c && echo "already patched" && exit 0
sed -i -e s/d_alias/d_u.d_alias/ vmhgfs-only/inode.c
cp -p vmhgfs.tar vmhgfs.tar.orig
tar cf vmhgfs.tar vmhgfs-only
vmware-config-tools.pl -d -m
After that, the Shared Folders functionality from VMWare will start working normally - in the / mnt / ngfs folder, connected folders will appear in the virtual machine settings.
NOTE: this method is not compatible with earlier kernel versions (below 3.13.0-45) !!!
After these corrections, I collected the tools back into the archive, from which you can now install the aces without bothering with additional steps to replace d_alias with d_u.d_alias. If someone needs me, I can upload the file. Tell me only where, the file weighs 178MB, I would like to put it on some kind of file hosting without registration and other troubles, so that it would lie there for a year or two at least.
In fairness, I think it should be noted that not only on tools from vmware the light came together in a wedge. There is a wonderful open-vm-tools project. The package, however, has not been updated for a long time, but at one time I managed it quite successfully and everything always worked right there. Besides open.
Also, good people suggest that there is still a convenient set of patches vmware-tools-patches .