Wednesday, February 22, 2017

Downloading Container Images from Proxmox

Download Container Images Programmatically

I wanted all of the Proxmox container templates to be available for my users to choose from and the pveam tool doesn't provide an easy way to do this. So I came up with a simple bash script to do this for me.

pveam available -section system | while read c1 c2; do pveam download templates $c2; done

This one-liner just downloads all the container system images to the storage location named templates. If you wanted all images just omit the '-section system' part. Stupid simple but a bit of a time saver compared to doing it by hand.