The likely cause is that the built-in policy "Azure Machine Learning Computes should be in a virtual network" audits whether compute clusters and compute instances are configured in a virtual network, while managed virtual network has its own behavior and limitations.
Supported facts to check:
- Managed virtual network is different from deploying computes into a custom virtual network.
When using Azure Machine Learning managed virtual network, compute resources can only be created inside the managed virtual network and can't be deployed inside a custom virtual network.
- Existing managed compute resources aren’t migrated automatically when managed virtual network is enabled.
If the workspace existed before managed virtual network was enabled, there is no supported migration path for existing managed compute resources. Existing compute clusters, compute instances, and managed online endpoints must be deleted and recreated after enabling the managed virtual network.
- Policy compliance can reflect how the resource was created or evaluated, not just current workspace intent.
If the noncompliant compute instances were created before managed virtual network was enabled, they can remain noncompliant until they are recreated.
- Custom policy controls can also affect managed virtual network behavior.
Microsoft recommends ensuring that Microsoft-managed private endpoints created for the managed virtual network are allowlisted in custom policy. Also make sure there are no scope locks on Azure Machine Learning resources or the resource group, because internal operations related to managed virtual network can be blocked.
So the most likely explanation is:
- the compute instances were created before managed virtual network isolation was enabled, or
- policy/custom policy evaluation is not recognizing the managed-network-related resources correctly until the computes are recreated.
A practical validation path is:
- Check whether the affected compute instances were created before managed virtual network was enabled on the workspace.
- If yes, delete and recreate those compute instances. Warning: this is destructive for the compute resource and should be planned carefully.
- Review whether any custom Azure Policy is blocking or not allowlisting the Microsoft-managed private endpoints required by the managed virtual network.
- Check for scope locks on the workspace resources or resource group.
References: