Added availability set to virtual machine and fixed HTTP 307 Redirection error.