rsync on ESXi 7

While using the built in scp command to copy files from one ESXi datastore to another on another ESXi, I realized this was cumbersome. A quick Internet search revealed that someone compiled rsync for ESXi many years ago and that it does work on ESXi 6.5 and also tested successfully on ESXi 7.0. I wanted to build to the latest version and the same source below revealed a Docker project that builds rsync. Without using Docker, this approach worked for me on CentOS 7 (not CentOS 8).

yum -y install epel-release git lz4-devel lz4-static libzstd libzstd-static \
openssl-static python3-pip python3-devel glibc-static popt-devel popt-static \
make automake xxhash-devel libzstd-devel gcc wget doxygen rpm-build \

pip3 install cmarkgfm

cd ~ 
mkdir ~/rpmbuild
wget https://download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/x/xxhash-0.8.2-1.el7.src.rpm
rpm -ivh xxhash-*.el7.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp xxhash.spec
cd ~/rpmbuild/BUILD/xxHash-*/
make install

RSYNC_VERSION=v3.2.7
cd ~
git clone https://github.com/WayneD/rsync.git
cd rsync
git checkout $RSYNC_VERSION

cd ~/rsync
LIBS="-ldl" ./configure
make -B CFLAGS="-static" 

echo should show  not a dynamic executable
ldd $(pwd)/rsync || true

#To reduce the filesize (optional) See link in sources below for explanation
strip --strip-all rsync
strip --remove-section=.comment --remove-section=.note rsync

With a couple of minor modifications to the commands and a couple of version changes, a compiled rsync version capable of running on ESXi was built.

rsync version 3.2.7 on ESXi 7.0U3

Source(s)

  • https://communities.vmware.com/t5/VMware-vSphere-Discussions/rsync-on-ESXi-6-5/td-p/1373311
  • https://github.com/gbenguria/rsync-esxi-docker-compiler
  • https://wiki.wxwidgets.org/Reducing_Executable_Size