Virtual Machine Scale Sets - azure

I have a test azure subscription, I have created a Virtual Machine Scale Sets.
There are no errors in the scale set.
How do I connect to VM's and make my server to put in a load?
Can I connect with RDP to my Scale set VM's ? is this allowed?

If you create VMSS via Azure portal Marketplace, we can't add inbound NAT rules to use RDP to login the VMSS instances, we can't RDP them directly.
So if you want to login those instances, we can create a new VM in the same Vnet(same Vnet can connect by the private IP address), and use the private IP to RDP.
How do I connect to VM's and make my server to put in a load?
By default, we can use load balancer public IP address and NAT port to RDP VMs behind the VMss.
Can I connect with RDP to my Scale set VM's ? is this allowed?
You can create a windows VM in the same Virtual Network, this VM work as a jumpbox, then use this vm to RDP those instances via private IP address.
Another way, modify template to add NAT rules.
More information about VMss and NAT rules, please refer to this link.

Related

How to establish an RDP connection to an Azure virtual machine availability set?

I created a new virtual machine scale set that's deployed over two availability zones, and I configured a load balancer and virtual network for the scale set. Now I want to connect to this new VM via RDP (in the same way I can connect to a standalone VM), but no such option seems to exist for the scale set.
Standalone VM:
Scale set VM:
How can I enable an RDP option for this new VM?
When you create a scale set in the portal, a load balancer is created. Network Address Translation (NAT) rules are used to distribute traffic to the scale set instances for remote connectivity such as RDP or SSH.
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-portal#connect-to-a-vm-in-the-scale-set

Cannot access Azure VM Scaleset ip address externally

I have created a Virtual Machine Scaleset in Azure
This scaleset is made up of 5 VMs
There is a public ip
When I do a ping on my public ip I get no response, nor do I get a response with the full name, e.g.
myapp.uksouth.cloudapp.azure.com
Is there something I have missed?
I am wondering if I have to add my machine's IP somewhere?
I am trying to remote into the machines within the scaleset eventually!
This scaleset will be used for azure service fabric
Paul
If you deploy your scale set with "public IP per VM", then each VM gets its own public IP: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine. However, this is not the default in the portal. In the portal, the default is to create a load balancer in front of the scale set with a single public IP on the LB (today, at least; no guarantee it will stay this way). It also comes with NAT rules configured to allow RDP/SSH on ports 50000 and above. They won't necessarily be contiguous, though (at least in the default configuration), so you will need to examine the NAT rules on the load balancer to see which ports are relevant. Once you do, you should be able to do ssh -p <port-from-nat-rule> <public-ip> to ssh in (or similar in your RDP client for Windows).
When I do a ping on my public ip I get no response
Azure does not support ping.
For test, you can use RDP/SSH public IP address with different ports to test the connection.
Are you create VMSS with Azure marketplace? If yes, the Azure LB will configured.
If the load balancer created by your self, please check LB probes, backend pools(all vms should in that backend pools), load balancer rules and NAT rules.
Also you can configure log analytics for Azure load balancer to monitor it.

Azure load balancer: NAT redirect RDP to VM, and load balance HTTP to availability set?

It looks like you can't NAT as well as load balance unless it's to the same destination. Once I created the NAT rule (so I can RDP to the load balancer over a custom port, and then that's redirected to my management VM), I cannot create the backend pool to use for HTTP load balancing. I go to backend pools and click create and it already fills in "associated with " and I cannot change that to my web VMs availability set.
I've also tried creating the backend pool first, for which I select the web VM availability set, but then when I create a NAT rule I cannot point to the management VM, only to the availability set/specific VM in that set.
What am I missing? Is there a solution besides recreating the management VM and putting it in the web VM availability set?
I've also tried creating the backend pool first, for which I select
the web VM availability set, but then when I create a NAT rule I
cannot point to the management VM, only to the availability
set/specific VM in that set.
All of these are by design behavior. LB only work for an availability set or a single VM.
Is there a solution besides recreating the management VM and putting
it in the web VM availability set?
No, if you want to use LB to connect to the management VM, we should recreate it and add this VM to that availability set.
If you just want this VM can connect to those VMs behind that LB, we can create this VM in that Vnet, then use management VM's public IP address to login this VM, and use private IP address to connect to those VMs.

Multiple vmss behind single Azure Load Balancer

We have multiple background worker vmss that do not need a public IP to work.
I want to be able to connect to arbitrary vm (e.g. to troubleshoot via rdp, or to collect some snapshots using remote profiler etc).
When there's only one VMSS per load balancer all works like a charm. I've setup nat pools for each port used on VMs and all works fine.
Now, if I'm trying to add one more vmss to the same load balancer (using its own nat / backend pools) the deployment fails with
Virtual Machine /subscriptions/.../resourceGroups/.../providers/Microsoft.Compute/virtualMachines/|providers|Micr
osoft.Compute|virtualMachineScaleSets|...|virtualMachines|0 is using different Availability Set than other Virtual Machines connected to the Load Balancer(s) ...
message.
As far as I know there's no way to set up availability set for vmss. Are there any options but keeping own load balancer/public ip for each VMSS?
UPD I've found similar scheme for VM+Availability Set setup (see ILB endpoint section).
Something like this for VMSS?
Your are right, we can't change availability set for vmss.
if I'm trying to add one more vmss to the same load balancer
As we know, we can't add different availability sets to single load balancer, so we can't add one or more VMSS to the same load balancer.
Are there any options but keeping own load balancer/public ip for each
VMSS?
We have multiple background worker vmss that do not need a public IP
to work.
Are those VMss in same VNet? If yes, we can deploy a new VM in the same Vnet, we can connect to this VM, then use this VM to connect to VMSS instances with internal IP addresses, in this way, this new VM work as a jumpbox. we can use this jumpbox to troubleshoot.
Update:
Is it possible then to have multiple vmss in same VNet and assign own
public api/load balancer for each of it?
Yes, we can create a new Azure VM with public IP, then install HAproxy on it, make this VM work as a load balancer, add all VMSS instances which in the same Vnet to HAproxy backend pool, in this way, we can access this VM's public IP address + your NAT port to connect VMss instance.

Changing the IP address of Azure Virtual Network cloud service

I have 2 different virtual networks set up in azure. The first of these virtual networks contains virtual machines in which I am able to set the internal virtual network IP as 10.101.1.4, 10.101.1.5, 10.101.1.6 on the virtual machines by using the preview portal to set the IP address
In my other virtual network I have a VPN connection and from the virtual network I add a Cloud service which we have informed the other side of the VPN will be available on 10.103.1.4 but for some reason this has now changed to 10.103.1.5
Is there any means of ensuring that the cloud service will always be deployed to the 10.103.1.4 IP address within the virtual network?
an compute instance or an azureVM get an IP-Adresse via DHCP and the lease time is 100+ years. to set a specific IP-Adresse to an azureVM/compute instance you can define a "static ip reservation" in your own VNET to this instance. e.g. via powershell, the new portal or via your cloud service configuration schema.
check out this link: https://azure.microsoft.com/en-us/blog/reserved-ip-addresses/
regards
patrick

Resources