question

MuhammedNoor-7966 avatar image
0 Votes"
MuhammedNoor-7966 asked srbhatta-msft answered

azure automactically changes subnet for vmss

I have an image, I need to created a vm scaleset from it.

I have a vnet "vnet1" and different subnets ("LB-subnet","VMSS-subnet","Mangement-Subnet"). I created a load balancer in LB-subnet and it has frontend ip of 10.2.0.4. After that I created a VMSS(uniform) from my image and put it in vmss-subnet and attached the LB to it. But after the VMSS deployment, when i check its subnet, it is randomly selected. or may be the first subnet is selected. There is no option in vmss or its instances to change/add the nic just like we can in normal machines. is there any way to avoid it.

azure-virtual-networkazure-virtual-machines-scale-set
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

srbhatta-msft avatar image
0 Votes"
srbhatta-msft answered

Hello @MuhammedNoor-7966 ,
Thank you for reaching out to Microsoft QnA.
I have done a repro of the same, and I see that every time the subnet of the VMSS gets changed to the subnet of the load balancer. This makes me think that it is the default behavior when we attach the vmss to a load balancer.
You can however add a secondary nic to your VMSS using this Powershell command and then update the VMSS. Once you update the VMSS, the secondary nic will be reflected at each of the VMSS instance level.

Hope this helps. If you have any queries, feel free to reach back.


Please accept as answer and upvote if the information provided was useful.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.