Monday, 22 July 2024

Configure Microsoft Dev Box

 

Configure Microsoft Dev Box

The process of setting up Microsoft Dev Box involves two distinct phases. In the first phase, platform engineers configure the necessary Microsoft Dev Box resources through the Azure portal. After this phase is complete, users can proceed to the next phase, creating and managing their dev boxes through the developer portal. This quickstart shows you how to complete the first phase.

The following graphic shows the steps required to configure Microsoft Dev Box in the Azure portal.

Image that shows the stages required to configure Microsoft Dev Box.

First, create a dev center and a project to organize dev box resources. Next, create a dev box definition to use when creating dev boxes. Then, create a dev box pool to define the network connection and dev box definition that dev boxes use. Users who have access to a project can create dev boxes from the pools associated with that project.

If you already have a Microsoft Dev Box configured and you want to learn how to create and connect to dev boxes, see Quickstart: Create a dev box by using the developer portal.

Prerequisites

To complete this quickstart, you need:

  • An Azure account with an active subscription. If you don't have an Azure subscription, create a free account before you begin.
  • Owner or Contributor role on an Azure subscription or resource group.
  • Microsoft Entra ID. Your organization must use Microsoft Entra ID for identity and access management.
  • Microsoft Intune. Your organization must use Microsoft Intune for device management.
  • User licenses. To use Dev Box, each user must be licensed for Windows 11 Enterprise or Windows 10 Enterprise, Microsoft Intune, and Microsoft Entra ID P1. These licenses are available independently and are included in the following subscriptions:
    • Microsoft 365 F3
    • Microsoft 365 E3, Microsoft 365 E5
    • Microsoft 365 A3, Microsoft 365 A5
    • Microsoft 365 Business Premium
    • Microsoft 365 Education Student Use Benefit
  • If your organization routes egress traffic through a firewall, open the appropriate ports. For more information, see Network requirements.
  • Register the Microsoft.DevCenter resource provider. For more information, see Register resource provider.

Create a dev center

To get started with Microsoft Dev Box, you first create a dev center. A dev center in Microsoft Dev Box provides a centralized place to manage a collection of projects, the configuration of available dev box images and sizes, and the networking settings to enable access to organizational resources.

Use the following steps to create a dev center so you can manage your dev box resources:

  1. Sign in to the Azure portal.

  2. In the search box, enter dev centers. In the list of results, select Dev centers.

    Screenshot that shows the Azure portal with the search box and the result for dev centers.

  3. On the Dev centers page, select Create.

    Screenshot that shows the Azure portal with the Create button on the page for dev centers.

  4. On the Create a dev center pane, on the Basics tab, enter the following values:

    SettingValue
    SubscriptionSelect the subscription in which you want to create the dev center.
    ResourceGroupSelect an existing resource group, or select Create new and then enter a name for the new resource group.
    NameEnter a name for your dev center.
    LocationSelect the location or region where you want the dev center to be created.
    Attach a quick start catalogClear both checkboxes.

    Screenshot that shows the Basics tab on the pane for creating a dev center.

    For a list of the currently supported Azure locations with capacity, see Frequently asked questions about Microsoft Dev Box.

  5. (Optional) On the Tags tab, enter a name/value pair that you want to assign.

    Screenshot that shows the Tags tab on the page for creating a dev center.

  6. Select Review + Create.

  7. On the Review tab, select Create.

  8. Track the progress of the dev center creation from any page in the Azure portal by opening the Notifications pane.

    Screenshot that shows the Notifications pane in the Azure portal.

  9. When the deployment completes, select Go to resource. Confirm that the dev center page appears.

Create a project

Dev box projects enable you to manage team-level settings. These settings include providing access to development teams so developers can create dev boxes. Each dev center needs at least one project.

To create and configure a project in a dev box:

  1. Sign in to the Azure portal.

  2. In the search box, enter projects. In the list of results, select Projects.

  3. On the Projects page, select Create.

  4. On the Create a project pane, on the Basics tab, enter the following values:

    SettingValue
    SubscriptionSelect the subscription in which you want to create the project.
    Resource groupSelect an existing resource group, or select Create new and then enter a name for the new resource group.
    Dev centerSelect the dev center that you want to associate with this project. All the settings at the dev center level apply to the project.
    NameEnter a name for the project.
    DescriptionEnter a brief description of the project.

    Screenshot that shows the Basics tab on the pane for creating a dev box project.

  5. On the Dev box management tab, ensure No is selected.

    You can select Yes to limit the number of dev boxes per developer, and specify the maximum number of dev boxes a developer can create. The default, No, means developers can create an unlimited number of dev boxes.

    To learn more about dev box limits, see Tutorial: Control costs by setting dev box limits on a project.

  6. (Optional) On the Tags tab, enter a name/value pair that you want to assign.

  7. Select Review + Create.

  8. On the Review tab, select Create.

  9. Confirm that the project is created successfully by checking the notifications. Select Go to resource.

  10. Verify that the project appears on the Projects page.

As you create a project, you might see this informational message about catalogs:

Screenshot of the informational message, The dev center that contains this project does not have a catalog assigned. Environments cannot be deployed in this project until a catalog containing at least one template has been assigned.

Because you're not configuring Deployment Environments, you can safely ignore this message.

Create a dev box definition

Next, you create a dev box definition in your dev center. A dev box definition defines the VM image and the VM SKU (compute size + storage) that are used in the creation of the dev boxes. Depending on the type of development project or developer profiles, you can create multiple dev box definitions. For example, some developers might need a specific developer tool set, whereas others need a cloud workstation that has more compute resources.

The dev box definitions you create in a dev center are available for all projects associated with that dev center. You need to add at least one dev box definition to your dev center.

To create and configure a dev box definition for your dev center:

  1. Open the dev center in which you want to create the dev box definition.

  2. Select Dev box definitions.

  3. On the Dev box definitions page, select Create.

  4. On the Create dev box definition page, enter the following values:

    SettingValueNote
    NameEnter a descriptive name for your dev box definition.
    ImageSelect the base operating system for the dev box. You can select an image from Azure Marketplace or from Azure Compute Gallery.
    If you're creating a dev box definition for testing purposes, consider using the Visual Studio 2022 Enterprise on Windows 11 Enterprise + Microsoft 365 Apps 22H2 image.
    To access custom images when you create a dev box definition, you can use Azure Compute Gallery. For more information, see Configure Azure Compute Gallery.
    Image versionSelect a specific, numbered version to ensure that all the dev boxes in the pool always use the same version of the image. Select Latest to ensure that new dev boxes use the latest image available.Selecting the Latest image version enables the dev box pool to use the most recent version of your chosen image from the gallery. This approach ensures the created dev boxes stay up to date with the latest tools and code for your image. Existing dev boxes aren't modified when an image version is updated.
    ComputeSelect the compute combination for your dev box definition.
    StorageSelect the amount of storage for your dev box definition.
    Enable hibernationLeave this checkbox unselected.

    Screenshot that shows the page for creating a dev box definition.

  5. Select Create.

Create a dev box pool

Now that you defined a dev box definition in your dev center, you can create a dev box pool in the project. A dev box pool is the collection of dev boxes that have the same settings, such as the dev box definition and network connection. Developers that have access to the project in the dev center, can then choose to create a dev box from a dev box pool.

Dev box pools define the location of the dev boxes through the specified network connection. You can choose to deploy dev boxes to a Microsoft-hosted network or to a network that you manage. If you choose to deploy dev boxes to a network that you manage, you must first configure a network connection. Organizations that support developers in multiple geographical locations can create dev box pools for each location by specifying a nearby region.

To create a dev box pool associated with a project:

  1. Sign in to the Azure portal.

  2. In the search box, enter projects. In the list of results, select Projects.

  3. Open the project in which you want to create the dev box pool.

    Screenshot that shows the list of existing projects.

  4. Select Dev box pools, and then select Create.

    Screenshot of an empty list of dev box pools within a project, along with selections to start creating a pool.

  5. On the Create a dev box pool pane, enter the following values:

    SettingValue
    NameEnter a name for the pool. The pool name is visible to developers to select when they're creating dev boxes. The name must be unique within a project.
    Dev box definitionSelect an existing dev box definition. The definition determines the base image and size for the dev boxes that are created in this pool.
    Network connection1. Select Deploy to a Microsoft hosted network.
    2. Select your desired deployment region for the dev boxes. Choose a region close to your expected dev box users for the optimal user experience.
    Dev box Creator PrivilegesSelect Local Administrator or Standard User.
    Enable Auto-stopYes is the default. Select No to disable an auto-stop schedule. You can configure an auto-stop schedule after the pool is created.
    Stop timeSelect a time to shut down all the dev boxes in the pool. All dev boxes in this pool shut down at this time every day.
    Time zoneSelect the time zone for the stop time.
    LicensingSelect this checkbox to confirm that your organization has Azure Hybrid Benefit licenses that you want to apply to the dev boxes in this pool.

    Screenshot of the pane for creating a dev box pool.

  6. Select Create.

  7. Verify that the new dev box pool appears in the list. You might need to refresh the screen.

The Azure portal deploys the dev box pool and runs health checks to ensure that the image and network pass the validation criteria for dev boxes. The following screenshot shows four dev box pools, each with a different status.

Screenshot that shows a list of dev box pools and status information.

Provide access to a dev box project

Before users can create dev boxes based on the dev box pools in a project, you must provide access for users through role assignments. The Dev Box User role enables dev box users to create, manage, and delete their own dev boxes. You grant access for the user at the level of the project.

To assign roles:

  1. Sign in to the Azure portal.

  2. In the search box, enter projects. In the list of results, select Projects.

  3. Select the project that you want to give team members access to.

    Screenshot of the list of existing projects.

  4. On the left menu, select Access control (IAM).

    Screenshot that shows the page for project access control.

  5. On the command bar, select Add > Add role assignment.

  6. Assign the following role. For detailed steps, see Assign Azure roles using the Azure portal.

    SettingValue
    RoleSelect DevCenter Dev Box User.
    Assign access toSelect User, group, or service principal.
    MembersSelect the users or groups that you want to be able to access to the project.

    Screenshot that shows the pane for adding a role assignment.

    The user can now view the project and all the pools within it. The user can create dev boxes from any of the pools and manage those dev boxes from the developer portal.

Manage a Microsoft Dev Box dev center

 

Manage a Microsoft Dev Box dev center

Permissions

To manage a dev center, you need the following permissions:

ActionPermissions required
Create or delete a dev centerOwner or Contributor permissions on an Azure subscription or a specific resource group.
Manage a dev centerOwner or Contributor role, or specific Write permission to the dev center.
Attach or remove a network connectionNetwork Contributor permissions on an existing network connection (Owner or Contributor).

Create a dev center

Your development teams' requirements change over time. You can create a new dev center in Microsoft Dev Box to support organizational changes like a new business requirement or a new regional center.

You can create as many or as few dev centers as you need, depending on how you organize and manage your development teams.

To create a dev center in the Azure portal:

  1. Sign in to the Azure portal.

  2. In the search box, enter dev centers. In the search results, select Dev centers from the Services list.

    Screenshot that shows the Azure portal with the search box and the result for dev centers.

  3. On the Dev centers page, select Create.

    Screenshot that shows the Azure portal with the Create button on the page for dev centers.

  4. On the Create a dev center pane, on the Basics tab, enter the following values:

    SettingValue
    SubscriptionSelect the subscription in which you want to create the dev center.
    ResourceGroupSelect an existing resource group, or select Create new and then enter a name for the new resource group.
    NameEnter a name for your dev center.
    LocationSelect the location or region where you want the dev center to be created.
    Attach a quick start catalogClear both checkboxes.

    Screenshot that shows the Basics tab on the pane for creating a dev center.

    For a list of the currently supported Azure locations with capacity, see Frequently asked questions about Microsoft Dev Box.

    The Dev Box quick start catalog contains tasks and scripts that you can use to configure your dev box during the final stage of the creation process. You can attach a quick start catalog to a dev center later. For more information, see Create reusable dev box customizations.

  5. (Optional) On the Tags tab, enter a name/value pair that you want to assign.

    Screenshot that shows the Tags tab on the page for creating a dev center.

  6. Select Review + Create.

  7. On the Review tab, select Create.

  8. Monitor the progress of the dev center creation from any page in the Azure portal by opening the Notifications pane.

    Screenshot that shows the Notifications pane in the Azure portal.

  9. When the deployment completes, select Go to resource. Confirm that the dev center page appears.

Delete a dev center

You might choose to delete a dev center to reflect organizational or workload changes. Deleting a dev center in Microsoft Dev Box is irreversible, and you must prepare for the deletion carefully.

A dev center can't be deleted while any projects are associated with it. You must delete the projects before you can delete the dev center.

Attached network connections and their associated virtual networks aren't deleted when you delete a dev center.

When you're ready to delete your dev center, follow these steps:

  1. Sign in to the Azure portal.

  2. In the search box, enter dev centers. In the search results, select Dev centers from the Services list.

  3. On the Dev centers page, open the dev center that you want to delete.

  4. Select Delete.

    Screenshot of the Delete button on the page for a dev center.

  5. In the confirmation message, select OK.

Attach a network connection to a dev center

You can attach existing network connections to a dev center. You must attach a network connection to a dev center before you can use it in projects to create dev box pools.

Network connections enable dev boxes to connect to existing virtual networks. The location, or Azure region, of the network connection determines where associated dev boxes are hosted.

To attach a network connection to a dev center in Microsoft Dev Box:

  1. Sign in to the Azure portal.

  2. In the search box, enter dev centers. In the list of results, select Dev centers.

  3. Select the dev center that you created, and then select Networking.

  4. Select + Add.

  5. On the Add network connection pane, select the network connection that you created earlier, and then select Add.

    Screenshot that shows the pane for adding a network connection.

After you attach a network connection, the Azure portal runs several health checks on the network. You can view the status of the checks on the resource overview page.

Screenshot that shows the status of a network connection.

You can add network connections that pass all health checks to a dev center and use them to create dev box pools. Dev boxes within dev box pools are created and domain joined in the location of the virtual network assigned to the network connection.

To resolve any errors, see Troubleshoot Azure network connections.

Remove a network connection from a dev center

You can remove network connections from dev centers. Network connections can't be removed if one or more dev box pools are using them.

  1. Sign in to the Azure portal.

  2. In the search box, enter dev centers. In the list of results, select Dev centers.

  3. Select the dev center that you created, and then select Networking.

  4. Select the network connection that you want to remove, and then select Remove.

    Screenshot that shows the Remove button on the network connection page.

  5. Review the warning message, and then select OK.