Question

I have configured a CMS solution in my Linux Virtual Machine on Azure and want to add this VM with my Virtual Netork. I am unable to add my existing Linux Virual machine to Virtual Network.

Any help is greatly appreciated.

Was it helpful?

Solution

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

OTHER TIPS

http://www.zdnet.com/blog/microsoft/microsoft-to-enable-linux-on-its-windows-azure-cloud-in-2012/11508

To date, Microsoft has been balking at customer requests to add persistent VMs to Azure, hoping to get customers to develop Azure apps from scratch instead ...

Running Linux on Azure has been a surprisingly big business-customer request, as well, my contacts said ...

The Register reported earlier this year that Microsoft was testing the ability to run Linux on Azure in its own labs, and that the launch of such a capability was still months away.

There are tons of VPS services out there where you can run any OS you want, quite reliably and quite inexpensively. Apparently, Azure isn't one of them :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top