Kindly help deploying customized (Hyper-V) Linux VM (VHD) on Azure. Will be very helpful if you can help me with power-shell script.

We have the power shell script to upload and deploy hyper-v windows vhd images on Azure which is working fine and same script is working good to upload customized Linux (Redhat) hyper-v vhd images on Azure but unable to use the same script to deploy customized uploaded Linux (Redhat) Hyper-v vhd on Azure.

  • Your going to need to provide more detail other than "we are unable to use the same script", what errors are you getting? – Sam Cogan Oct 6 '16 at 16:32
  • Welcome and thank you for posting. Getting good answers requires a clear and useful question which is well written , on-topic and contains sufficient details to provide you with a good solution. - Please improve your question to address those points or run the risk of leaving your problem unresolved and/or having your question closed. – HBruijn Oct 24 '16 at 13:26

According to your description, I think there are two points to consider:

  1. Is the Linux VHD correct? The Hyper-V Linux VM’s VHD can’t upload and deploy directly, we need to prepare the Redhat Linux virtual machine for use in Azure. We need to configure the network and install WaAgent, modify the kernel boot line in your grub configuration and so on. More information about how to prepare a redhat Virtual machine for Azure, please refer to the link below:
  2. Is the PowerShell script correct? Use PowerShell script to deploy VM in Azure, Windows’ script and Linux’s script is different. For example, when you set a VM OS disk, Windows’ command is “Set-AzureRmVMOSDisk -Windows”, but Linux’s command is “Set-AzureRmVMOSDisk -Linux”, so we need to check the PowerShell script.

Another way we can use template to deploy the VM, open the link below and click the button “Deploy to Azure”, type in parameters and click the “create”. Also you can edit the template to deploy the VM.

Deploy from a custom template

If you still have questions, welcome to post back here. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.