Jump to content
XPEnology Community

Howto compile & run VMware Tools Docker under DSM 7.x


Recommended Posts

This howto shows how to compile and run the current VMware Tools in a docker container.

 

After a long time of not having enough free time to look at Xpenology I finally got the opportunity to study at which point the project is. (I read a looot of threads :-) ).

 

I tested today if I am able to migrate a test installation from a DSM 6.2.3 (DS 3615) to DSM 7.1.0-42661 (DS3622xs) under VMware ESXi.

 

Thanks to the very good Tutorials from @flyride (THANK YOU VERY MUCH!) from here:

and here

 

I was able to do the migration.

Also a big THANK YOU to all other contributors to this project too! Awesome solutions were build the last months! :-)

 

Afterwards I was looking around what is running and what is missing in my new DSM 7.1.0.

 

The most visible missing part were the VMware Tools.

Even Docker runs (till now) stable and without problems.

 

After looking around the topic "VMware Tools under DSM 7" I found an 5 year old repository which contains the information about a Docker container for the VMware Tools.

I am aware that a 5 year old container is not safe to run today but the author added the source Dockerfile also in the repository, so I am able to have a look HOW the docker image was build.

 

I am no real Developer so my knowledge about docker is a little bit limited but I managed with a few changes to build the container with an actual Debian Image as a base containing the current VMware-Tools. :-)

 

So these steps worked perfectly for me:

 

## 1. Prerequisites

- Install Docker in DSM
- Enable SSH access in DSM
- Login via ssh as admin:

ssh admin@ds


- become root:

sudo -i


- cd into docker-dir:

cd /volume1/docker

__________________________________________

 

## 2. Download Source Repo

 

The original Repository is here:
https://github.com/yale-wp/docker-xpenology-open-vm-tools

 

- I forked it and adjusted it a little bit: https://github.com/MrE101/docker-xpenology-open-vm-tools

 

- Download the current repo as a zip-file to the current directory (/volume1/docker):

wget https://github.com/MrE101/docker-xpenology-open-vm-tools/archive/refs/heads/master.zip

__________________________________________

 

## 3. Extract Source Repo

 

root@ds4:/volume1/docker# 7z x master.zip

__________________________________________

 

## 4. Adjust Dockerfile

 

- cd into extraction-directory:

 

root@ds4:/volume1/docker# cd docker-xpenology-open-vm-tools-master/

__________________________________________

 

## 5. Compile the Image and run the Docker-Container afterwards

 

- compile the docker image and name the image "open-vm-tools":

 

docker build -t open-vm-tools -f Dockerfile .

 

- Start the container from the new image:

 

docker run -d --restart=always --net=host -v /root/.ssh/:/root/.ssh/ --name open-vm-tools open-vm-tools

 

With this command the container will run at every boot.
__________________________________________

 

The ESXi is happy and I am happy too. :-)

 

Even the IP addresses (IPv4 & IPv6 including the docker addresses) are shown!

 

I have tested successfully a "shutdown guest" and "reboot guest".

So for me everything works as expected.

 

Feel free to use or correct my findings as needed.


I am sure that my solution is not the best but it works for me.  :-)

2022-06-05_20_41_20-DSM_docker_vmware_tools_running.jpg

Link to comment
Share on other sites

Thank you very much for the new repositories!

 

After looking around it seems that all of them are the "good solution" with a SPK at the end so it will be installable natively in DSM without docker.

I think the SPK solution will be have a hard time running on DSM 7.x as there is no root-access for a SPK anymore, if I am not completly wrong.

 

I see today that I was not the first one with the idea to update the dockerfile from "yale-wp" and have found this (much better written) update to it:

https://github.com/delta-whiplash/docker-xpenology-open-vm-tools

 

This docker image runs under an actual Ubuntu and is even downloadable from the docker registry with one command:

docker run -d --restart=always --net=host -v /root/.ssh/:/root/.ssh/ --name open-vm-tools whiplashorus/docker-xpenology-open-vm-tools

 

I deleted my github repository as the one from "delta-whiplash" is much better. But it is all about to learn and become better. :-)

 

Sadly I am not able to modify the first post, so I would appreciate if a mod can exchange the wget link at "# 2."  with

wget https://github.com/delta-whiplash/docker-xpenology-open-vm-tools/archive/refs/heads/master.zip

or even delete the whole Thread as it is not needed to build the image personally if it can be downloaded and started with a single line.

 

I will tag some members I think they may be interested in a working VMware Tools solution too: @pocopico , @haydibe , @WiteWulf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...