While creating a Debian 8 (Jessie) template using DAB, apt-get install php-pear is successful, but thereafter pear upgrade fails since /etc/resolv.conf has not yet been created with a valid nameserver as that happens only on VM creation. A possible workaround is:
apt-get install php-pear...