Automatically download all VMware images

Get every new VMware image automatically!

New! You can now automatically get every VMware image as soon as it’s released.

You need a Linux or UNIX box with rsync and BitTorrent:

  • rsync will check every day for new torrents, and download them
  • BitTorrent will read the torrents, and download the VMware images

Setting this up will take about 4 minutes.

These instructions assume you use the official BitTorrent client.

If you use Fedora Core 5 or Fedora Core 6

# Switch to root
su - root

# Install rsync and bittorrent
yum install rsync bittorrent

# Run a test download of the torrent files
rsync -Pr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
# You should see a list of .torrent files

# Tell cron to regularly download new torrent files using rsync
# Create a 
## Edit crontab
vi /etc/crontab
## Add the line:
@hourly	root	rsync -qr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
## Save the file. You do not need to restart cron.

# Tell BitTorrent to watch the /srv/bittorrent/data/ directory for new files
## Start BitTorrent at boot
chkconfig btseed on
## Start it now too (no need to reboot)
/etc/init.d/btseed start

# You're done! Your new images will be visible in the download directory
ls /srv/bittorrent/data/

If you use Debian Sarge (Debian 3.1) or Debian Etch (Debian 4.0)

# Switch to root
su - root

# Install rsync and bittorrent
apt-get install rsync bittorrent

# Create a user "btgrabber" to run this as
adduser --no-create-home --home /srv/bittorrent/data/ --disabled-login --gecos "" btgrabber

# Make a directory to store the torrent files and the images
mkdir -p /srv/bittorrent/data/
# Fix permissions
chown btgrabber:btgrabber /srv/bittorrent/data/

# Tell cron to regularly download new torrent files using rsync
## Edit crontab
vi /etc/crontab
## Add the line:
@hourly	btgrabber	rsync -qr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
## Save the file. You do not need to restart cron.

# Run a test download of the torrent files
## Switch user
su - btgrabber
## Do the rsync
rsync -Pr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
## Switch back to root
exit

# Tell BitTorrent to watch the /srv/bittorrent/data/ directory for new files
## Create a script to start BitTorrent
vi /usr/local/bin/start-bittorrent.sh
## Add these two lines:
#!/bin/sh
nohup btlaunchmany /srv/bittorrent/data/ > /tmp/bittorrent.log &
## Save the file.
## Fix permissions
chmod +x /usr/local/bin/start-bittorrent.sh
## Tell crontab to start BitTorrent at boot
vi /etc/crontab
## Add the line:
@reboot btgrabber /usr/local/bin/start-bittorrent.sh
## Save the file.
## Change to the new user
su - btgrabber
## Start it now too (no need to reboot)
/usr/local/bin/start-bittorrent.sh

# You're done! Your new images will be visible in the download directory
ls /srv/bittorrent/data/

If you use Ubuntu 6.06 (Dapper Drake) or or Ubuntu 6.10 (Edgy Eft)

# Install rsync and bittorrent
sudo apt-get install rsync bittorrent

# Create a user "btgrabber" to run this as
sudo adduser --no-create-home  --home /srv/bittorrent/data/ --disabled-login --gecos "" btgrabber

# Make a directory to store the torrent files and the images
sudo mkdir -p /srv/bittorrent/data/
# Fix permissions
sudo chown btgrabber:btgrabber /srv/bittorrent/data/

# Tell cron to regularly download new torrent files using rsync
## Edit crontab
sudo vi /etc/crontab
## Add the line:
@hourly	btgrabber	rsync -qr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
## Save the file. You do not need to restart cron.

# Run a test download of the torrent files
## Switch user
su - btgrabber
## Do the rsync
rsync -Pr rsync-torrents.thoughtpolice.co.uk::vmware-images-torrents /srv/bittorrent/data/
## Switch back to root
exit

# Tell BitTorrent to watch the /srv/bittorrent/data/ directory for new files
## Create a script to start BitTorrent
sudo vi /usr/local/bin/start-bittorrent.sh
## Add these two lines:
#!/bin/sh
nohup btlaunchmany /srv/bittorrent/data/ > /tmp/bittorrent.log &
## Save the file.
## Fix permissions
sudo chmod +x /usr/local/bin/start-bittorrent.sh
## Tell crontab to start BitTorrent at boot
sudo vi /etc/crontab
## Add the line:
@reboot btgrabber /usr/local/bin/start-bittorrent.sh
## Save the file.
## Change to the new user
su - btgrabber
## Start it now too (no need to reboot)
/usr/local/bin/start-bittorrent.sh

# You're done! Your new images will be visible in the download directory
ls /srv/bittorrent/data/