Share via

Azure SDK Error 404 when listing network interfaces of scale set

Barak Pahima 60 Reputation points
2023-09-04T09:25:39.3733333+00:00

Hi,

I'm using Azure Management SDK to manage my scale sets. When I try to list all the network interfaces of an Azure VM in a scale set, I get a 404 error even though the scale set exists.

This code works:

for (VirtualMachineScaleSetVM instance : scaleSet.virtualMachines().list())

But this one returns 404 error:

PagedIterable<VirtualMachineScaleSetNetworkInterface> networkInterfaces = instance.listNetworkInterfaces();

I hope you can help me solve this issue.

Barak.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets

Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.


7 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. ekpathak 20 Reputation points Microsoft Employee Moderator
    2023-09-07T08:13:51.1766667+00:00

    Hello Barak Pahima Welcome to Microsoft Q&A. Thank you for posting your query here!

    The error message you are seeing is related to the fact that there is no outbound internet connection for the Virtual Machine Scale Set. The error message is not related to the code you are using to list the network interfaces of the Azure VM in the scale set.

    To resolve the error, you need to enable secure outbound access for your Virtual Machine Scale Set by using a method that's best suited for your application. Outbound access can be enabled by using one of the following methods:

    • Use a Network Address Translation (NAT) Gateway on your subnet.
    • Add scale set instances to a Load Balancer backend pool.
    • Add an explicit public IP address per scale set instance.

    For more information, please see the following document: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machine-scale-sets/vmss-outbound-connectivity-not-enabled

    Please let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    -Ekta

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.