Skip to content

Commit 7110613

Browse files
Merge pull request #285064 from Blackmist/manually-provision
adding info on manually provisioning
2 parents cc11189 + 24d1be4 commit 7110613

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

articles/ai-studio/how-to/configure-managed-network.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,52 @@ To configure a managed virtual network that allows only approved outbound commun
629629

630630
---
631631

632+
## Manually provision a managed VNet
633+
634+
The managed VNet is automatically provisioned when you create a compute instance. When you rely on automatic provisioning, it can take around __30 minutes__ to create the first compute instance as it is also provisioning the network. If you configured FQDN outbound rules (only available with allow only approved mode), the first FQDN rule adds around __10 minutes__ to the provisioning time. If you have a large set of outbound rules to be provisioned in the managed network, it can take longer for provisioning to complete. The increased provisioning time can cause your first compute instance creation to time out.
635+
636+
To reduce the wait time and avoid potential timeout errors, we recommend manually provisioning the managed network. Then wait until the provisioning completes before you create a compute instance.
637+
638+
> [!NOTE]
639+
> To create an online deployment, you must manually provision the managed network, or create a compute instance first which will automatically provision it.
640+
641+
# [Azure portal](#tab/portal)
642+
643+
Use the __Azure CLI__ or __Python SDK__ tabs to learn how to manually provision the managed VNet.
644+
645+
# [Azure CLI](#tab/azure-cli)
646+
647+
The following example shows how to provision a managed VNet.
648+
649+
```azurecli
650+
az ml workspace provision-network -g my_resource_group -n my_ai_hub_name
651+
```
652+
653+
To verify that the provisioning has completed, use the following command:
654+
655+
```azurecli
656+
az ml workspace show -n my_ai_hub_name -g my_resource_group --query managed_network
657+
```
658+
659+
# [Python SDK](#tab/python)
660+
661+
The following example shows how to provision a managed VNet:
662+
663+
```python
664+
# Connect to a workspace named "myworkspace"
665+
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace_name="myAIHubName")
666+
667+
provision_network_result = ml_client.workspaces.begin_provision_network(workspace_name=ai_hub_name).result()
668+
```
669+
670+
To verify that the AI Hub has been provisioned, use `ml_client.workspaces.get()` to get the AI Hub information. The `managed_network` property contains the status of the managed network.
671+
672+
```python
673+
ws = ml_client.workspaces.get()
674+
print(ws.managed_network.status)
675+
```
676+
677+
---
632678

633679
## Manage outbound rules
634680

0 commit comments

Comments
 (0)