locked
linux VM RRS feed

  • Question

  • configured a CMS solution in my Linux Virtual Machine on Azure and want to add this VM with my Virtual Netork.   unable to do so . pls help
    Friday, August 28, 2015 8:10 AM

Answers

  • Hi,

    Thanks for posting here.

    As your Linux VM was created first and Virtual Network (VNet) was created after, your Linux VM may not be able to see the Virtual Network.(This is a known issues with Linux VM)

    You can follow given steps to achieve your objective:

    1. Delete the current VM (this will still keep the VHD stored in Azure Storage)
    2. Now go to Virtual Machines > Disks, and find the OS disk you want to use and select Delete Disk. This does not delete the VHD, only unregisters it as a disk
    3. Now create an OS image from your Saved VHD, which was use for previous VM
    4. Now create a VM from OS image (#3)

    This way you will have your VM ready and now to add it to VNet.

    Now because you are using Linux VM to connect with VNet, there is one problem. You can not do it with your Linux VM as Windows Azure Manager Portal does not support this feature so you would need to use PowerShell command (on Windows) or Cross-Platform tools (on Mac and Linux) to achieve your objective.

    Following are the command you will use to create a new VM using an OS Image and Virtual Network:

    $vm = New-AzureVMConfig -Name $vmname -InstanceSize ExtraSmall -ImageName $image | Add-AzureProvisioningConfig -Linux –LinuxUser $linuxUser -Password $adminPassword | Set-AzureSubnet -SubnetNames $subnet

    New-AzureVM -ServiceName $cloudSvcName -AffinityGroup $affinitygroup -VNetName $vnetname -VMs $vm

    Regards.

    • Proposed as answer by Girish Prajwal Sunday, August 30, 2015 2:22 PM
    • Marked as answer by Girish Prajwal Tuesday, September 1, 2015 2:12 PM
    Friday, August 28, 2015 9:11 AM