Installation and shell to move physical and logical SQL Server in azure IaaS VM Firts of all excuse my english is not my primary language.

We are creating an azure template to deploy an IaaS machine with disks C and D with windows server, and the idea is also deploy an installation of sql server, so initially the engine binaries and files will be deployed in the C and D drive drives.

We have some questions to see if it is possible to do in azure


Is it possible to install through a template not only the OS but also SQL Server?
If the previous question is possible to do after the installation of SQL Server, is there a script or a guide to create a script to move the logical and physical sql server files without having to enter sql server management studio and execute a t-sql script or move the files manually?. The idea behind this is to automate as much as possible the deploy of the Virtual Machine and to move the files to his respective volumes to fullfill SQL Server best practices regarding the separation of the log data from the user data and tempdb and also the restart of the instance once the previous steps are done.
or is there a way to do the install of the OS and SQL Server and in the template specify wich files of the database have to go to an specific disk and avoid the movement in a further step of the deployment of the machine


thanks in advance
It's typically not necessary to use custom templates and installation for SQL Server on Azure Virtual Machines.  The Azure Marketplace has an extensive collection of pre-configured templates for SQL Server on Azure Virtual Machines, which you can deploy through the Azure Portal or through Powershell.  These are built and maintained by the SQL Server engineering team, and definitely the easiest way to deploy and run SQL Server on Azure VMs.