I've 8 VMs (linux based) running a single VNet on Azure. If I've two VMs running a service on the same port which shows me machine status or shows some common details which is specific to the VM. Say for example
VM-1 runs a service on 8080 port and same same service has been deployed on VM-2 which runs on the same port 8080. To access to a service running on port 8080 I am opening a port on VM-1 through end points. I am able to access 8080 from web browser through VM-1 using servicename.webapp.net:8080. But If I want to check the status of VM-2, I am not able to open the port 8080 on the VM-2. Probably because the port is opened at the service level and not the VM level. Is there a way I can open the port at the VM level and use VM-x:port?
Another approach I thought which could be useful is : Assign the staticIP/ReservedIP to each of the VM and open the port on individual machines should be possible, instead of open the port at the VNet/service level. Is it possible to assign static/reserved IP to all 8 of the machines once they have been started and operational? And we also need to make sure that, after restart all the eight machines retain the same IPs.
I tried following blog https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/ and tried following command :
$image = Get-AzureVMImage|?{$_.ImageName -like "*AMI-20150919-849187*"}
New-AzureVMConfig -Name StaticIPVMCOnfig -InstanceSize Small -ImageName $image.ImageName
-CurrentStorageAccountName "myStorageACName"
| Add-AzureProvisioningConfig -Linux -LinuxUser root -Password MyP@ssword!
| New-AzureVM -ServiceName myCloudServiceName -ReservedIPName MyReservedIP
-Location "West Europe"
I still see the new VM is getting launched with same same VIP as the other VMs in the VNet. I am not sure if I am missing something.
Attaching the screenshots one is created without static/reservedIP CMDlets. Another is created from PowerShell. Both share the same VIP.
Could someone please help with this?
PS: Intentionally I am keeping the public VIPs to show that they are same. (I've closed and not using this service anymore).
Thanks, JE