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
rpm -ivh xxhash-*.el7.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bp xxhash.spec
cd ~/rpmbuild/BUILD/xxHash-*/
make install

cd ~
git clone
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