-2

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.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114
  • 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 06 '16 at 16:32
  • Welcome and thank you for posting. Getting good answers requires a clear and useful question which is [well written](http://meta.serverfault.com/a/3609/37681) , [on-topic](http://serverfault.com/help/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

1 Answers1

0

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:
    https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-redhat-create-upload-vhd/#rhel67hyperv
  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.
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-from-specialized-vhd

Deploy from a custom template

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

Jason Ye
  • 2,399
  • 1
  • 8
  • 10