# Deploy Azure Hosts

**URL:** https://forums.suse.com/t/deploy-azure-hosts/1442
**Category:** Rancher 1.x
**Created:** [January 12, 2016, 9:36am UTC](https://forums.suse.com/t/deploy-azure-hosts/1442 "2016-01-12T09:36:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kvaes](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kvaes/32/972_2.png) [@kvaes](https://forums.suse.com/u/kvaes)
#### Post date: [January 12, 2016, 9:36am UTC](https://forums.suse.com/t/deploy-azure-hosts/1442/1 "2016-01-12T09:36:16Z")

</div>

Could anyone point me to the correct way to setup Azure hosts?

When using the “Add Hosts”, and then “Other” I always get the following error message ;

“illegal base64 data at input byte 11”

Though, when I try the same ,directly from the shell of the Rancher host with a (debug purposed) local install of docker-machine, it works without a hassle…

> root@rancher01:~# vi Azure.publishsettings  
> root@rancher01:~# curl -L [https://github.com/docker/machine/releases/download/v0.5.3/docker-machine\_linux-amd64](https://github.com/docker/machine/releases/download/v0.5.3/docker-machine_linux-amd64) \>/usr/local/bin/docker-machine  
> % Total % Received % Xferd Average Speed Time Time Time Current  
> Dload Upload Total Spent Left Speed  
> 100 599 0 599 0 0 262 0 --:–:-- 0:00:02 --:–:-- 262  
> 100 14.1M 100 14.1M 0 0 2183k 0 0:00:06 0:00:06 --:–:-- 3823k  
> root@rancher01:~# chmod +x /usr/local/bin/docker-machine  
> root@rancher01:~# docker-machine create -d azure --azure-publish-settings-file /root/Azure.publishsettings testrancherhost  
> Creating CA: /root/.docker/machine/certs/ca.pem  
> Creating client certificate: /root/.docker/machine/certs/cert.pem  
> Running pre-create checks…  
> Creating machine…  
> (testrancherhost) Creating Azure machine…  
> Waiting for machine to be running, this may take a few minutes…

I’ve tested both the publishsettings file & the certificate method. Both give the same result…

“illegal base64 data at input byte \*\*\*” (where the byte sometimes changes)

Is this familiar to someone?

---

<div class="post-metadata">

### Author: ![kvaes](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kvaes/32/972_2.png) [@kvaes](https://forums.suse.com/u/kvaes)
#### Post date: [January 15, 2016, 2:39pm UTC](https://forums.suse.com/t/deploy-azure-hosts/1442/2 "2016-01-15T14:39:38Z")

</div>

Issue fixed ; [https://kvaes.wordpress.com/2016/01/15/rancher-provisioning-hosts-on-azure/](https://kvaes.wordpress.com/2016/01/15/rancher-provisioning-hosts-on-azure/)

The “subscriptionCert” should be a base64 encoded string of your .pem certificate.

> cat ~/.docker/ca.pem | base64

---

<div class="post-metadata">

### Author: ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)
#### Post date: [January 15, 2016, 2:58pm UTC](https://forums.suse.com/t/deploy-azure-hosts/1442/3 "2016-01-15T14:58:43Z")

</div>

Sorry for lack of response @kvaes. I’m glad you figured it out and thanks for the cool write up. I’ll see if we can note the base64 issue somewhere in the UI or docs.

---

<div class="post-metadata">

### Author: ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)
#### Post date: [January 19, 2016, 6:46pm UTC](https://forums.suse.com/t/deploy-azure-hosts/1442/4 "2016-01-19T18:46:53Z")

</div>



---

<div class="post-metadata">

### Author: ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)
#### Post date: [January 19, 2016, 6:47pm UTC](https://forums.suse.com/t/deploy-azure-hosts/1442/5 "2016-01-19T18:47:32Z")

</div>

Thanks for the update. I’ve just updated the docs to include some notes on this. I have never deployed on Azure so wasn’t able to test it out myself to provide you additional information.
