Monday, January 7, 2013

Fedora 17 open-vm-tools

[UPDATE 2013-04-24]
This blog post here is now obsolete as open-vm-tools-9.2.2 with Fedora specific scripts is now available (via yum) from Fedora for both Fedora-17Fedora-18 and soon to be Fedora-19 too.
Also a new stable open-vm-tools (open-vm-tools-9.2.3-1031360) has been released today 2013-04-24. A pseudo list of fixes is on Dmitry Torokhov page.

[UPDATE 2013-04-08]
Starting in Fedora 18, procps has been replaced by procps-ng. I used a soft symlink to point to libprocps: $ sudo ln -s /usr/lib/ /usr/lib/ You will need to install the dev packages from Fedora.
Also you will have to build using CFLAGS=-Wno-deprecated-declarations to avoid errors from deprecated glib code.
AFAIK neither Fedora 16 nor 17 come with open-vm-tools, the open-source version of vmware-tools provided for guest systems by vmware. Ubuntu and OpenSUSE both have this essential tool in their repositories. In their instructions specifically for Fedora 16/17, vmware says to use the version of vmware-tools that comes with vmware-player, however, if your host machine is too old to run the latest version, then you are SOL because you can only update vmware-tools by updating vmware-player, which is a catch-22. Perhaps fortunately now, you can download current version of vmware-tools if you can figure out which version to use, because only red-hat enterprise is listed.

Fortunately you can build open-vm-tools from source, just make sure you have the dev files from the following packages:

  • gtk
  • pam
  • ... <need to finish this list>
You can install them using `sudo yum install <package>-dev`. As you are building open-vm-tools you will be prompted which dev-packages are missing, so just install and restart.

To build you follow the familiar autotools pattern: `./configure`, `make` and `make install` which will automatically put it in /usr/local/... which is probably the best place for it. I don't recommend ever installing anything into /usr/bin/ or /usr/lib/ because they will probably be overwritten on any updates/upgrades and distribution updates/upgrades. The other option would be either /opt or ~/opt but that is usually reserved for precompiled binaries that are ready to be installed, and placing an add-on software package in ~/opt will only allow the user who installs it to use it, which might be your intent - but I digress.

I had no problems installing the dev packages or building open-vm-tools for my Fedora 17 vm, but when I restarted, the guest tools service isn't running! Of course, because I need to edit my /etc/init.d folder to add open-vm-tools as a service. I'm still working on that part, there are some clues on Fedora's init scripts man page and I've also copied the init.d scripts from Ubuntu's and openSUSE's open-vm-tool scripts. And of course there is also which should also provide some more clues. One thought I had was to download one of the newer vmware-tools tarballs for RHEL and see what's in that version script.

I was able to start the service manually by executing vmware-user-suid-wrapper but it complains that some of the modules haven't been loaded before logging in. You can load the modules manually too, but the init.d scripts are the right way to go. Even without the modules I can get drag and drop and auto-screen resizing to work just by running vmtoolsd or the aforementioned vmware-user.suid-wrapper. I can also mount my host shared folders using vmware-mounter. If anyone wants to help out, then we will have a very nice packaged version of open-vm-tools for Fedora.

The best online help I've found for open-vm-tools and vmware-tools for linux guests actually has been on the arch-linux site. According to the first few paragraphs you can enable open-vm-tools at boot by using `systemctl start vmtoolsd` and `systemctl enable vmtoolsd`. Trying either of these commands returns `vmtoolsd.service not found`. Bummer. Googling gives these fedora links:
The last of these 3 links seems to confirm that indeed systemctl will automatically add the service for the next boot. However I don't think this takes care of all of the scripts, there are some in /etc/sysconfig. Anyway, it's obvious that you have to have the /etc/init.d or rc.d and /sysconfig scripts to start and enable the service. The file from my version of vmware was too old to be relevant. There are rpm's of more current vmware-config-tools, so maybe I'll have a look in there.

No comments:

Post a Comment

Fork me on GitHub