How to speed up rancher host provisioning?

Hi,

When we use rancher / docker machine to provision a host on openstack, it takes lot of time to provision the host, install docker and then pull rancher agent and then launch it(total process took me approximately 20 minutes).

So I created a snapshot of a machine with docker pre-installed and rancher agent already pulled on it. I used that image as machine image and used rancher machine api and tried to provision the host. But I’m getting below error,

INFO[22921] stderr: Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host “192.168.54.223:2376”: read tcp 172.17.0.2:37260->192.168.54.223:2376: read: connection reset by peer resourceId=1ph228

Could you please advise how to fix this?

Thank you.