question

Sabrina-6461 avatar image
0 Votes"
Sabrina-6461 asked AndreasBaumgarten answered

How to enforce a limit for the egress traffic created by a virtual machine?

If a non-admin user is creating a VM from a designated resource group, how do I enforce a limit to the amount of egress traffic that VM can create?

azure-virtual-machinesazure-virtual-machines-networking
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.

vipullag-MSFT avatar image
0 Votes"
vipullag-MSFT answered vipullag-MSFT commented

@Sabrina-6461

Based on your ask, you would like to block internet access if I exceed a limit.

Assuming this access is blocked, it will impact VM accessing storage and also the connectivity to the VM itself (as all are public endpoints).

As of today, there is NO option from Azure to enforce it.

However, you can try something from your end if you can setup a logic to keep track of outbound data per user basis.

I will share this as a feature request to the VM Product team. The team can evaluate and can add this request to backlog based on feasibility.

Hope this helps.
Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

· 2
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.

@vipullag-MSFT, I can play with adding logic to keep track of the outbound data. Do you know the service I can query for this?

0 Votes 0 ·
AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered

Hi @Sabrina-6461 ,

you can't limit the outbound data like @vipullag-MSFT explained.

But you can monitor the outbound traffic using the Metrics of the VM.

In the screenshot you can see the Network outbound of a VM over the last 30 days. Just for information: The VM is temporary deallocated.

146080-image.png


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten



image.png (165.7 KiB)
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.