|
| 1 | +--- |
| 2 | +title: Write an Individual Customization File for Your Dev Box |
| 3 | +description: Learn how to upload and validate individual customization files for dev boxes directly from your local drive or repository. |
| 4 | +#customer intent: As a Dev Center Admin or Project Admin, I want to create image definition files so that my development teams can create customized dev boxes. |
| 5 | +author: RoseHJM |
| 6 | +ms.author: rosemalcolm |
| 7 | +ms.service: dev-box |
| 8 | +ms.custom: |
| 9 | + - ignite-2024 |
| 10 | + - ai-gen-docs-bap |
| 11 | + - ai-gen-title |
| 12 | + - ai-seo-date:04/19/2025 |
| 13 | + - ai-gen-description |
| 14 | +ms.topic: how-to |
| 15 | +ms.date: 04/19/2025 |
| 16 | +--- |
| 17 | + |
| 18 | +# Write an individual customization file for a dev box |
| 19 | + |
| 20 | +The Dev Box individual customizations feature helps you streamline the setup of your dev boxes. Starting a new project or joining a team is often complex and time consuming. With customizations, you can configure your dev boxes with the applications, tools, repositories, code libraries, packages, and build scripts that you need. This article guides you through the process of creating, testing, and editing an individual customization file for your dev box using Visual Studio Code (VS Code). |
| 21 | + |
| 22 | +You can use customizations in Microsoft Dev Box in two ways. Team customizations are used to create a shared configuration for a team of developers. Individual customizations are used to create a personal configuration for an individual developer. The following table summarizes the differences between the two types of customizations. |
| 23 | + |
| 24 | +| Feature | Team customizations | Individual customizations | |
| 25 | +|-----------------------------|---------------------------|----------------------------------| |
| 26 | +| Configure on | Dev box pool | Dev box | |
| 27 | +| Customizations apply to | All dev boxes in pool | Individual dev box | |
| 28 | +| Easily shareable | Yes | No | |
| 29 | +| Customizations file name | Imagedefinition.yaml | *myfilename.yaml* or *workload.yaml* | |
| 30 | +| Sourced from | Catalog | Uploaded or from personal repository | |
| 31 | +| Supports key vault secrets | Yes | Yes | |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +To complete the steps in this article, you must: |
| 36 | + |
| 37 | +- Have a [dev center configured with a dev box definition, dev box pool, and dev box project](./quickstart-configure-dev-box-service.md) so that you can create a dev box. |
| 38 | +- Be a member of the Dev Box Users security group for at least one project. |
| 39 | +- Have a catalog attached to the dev center with tasks that you can use in your customization file. If you don't have a catalog, see [Add and configure a catalog from GitHub or Azure Repos](../deployment-environments/how-to-configure-catalog.md). |
| 40 | + |
| 41 | +## Permissions required to configure customizations |
| 42 | + |
| 43 | +To perform the required actions for creating and applying customizations to a dev box, you need the following permissions: |
| 44 | + |
| 45 | +| Action | Permission/Role | |
| 46 | +|--------------------------------------------------|-----------------------| |
| 47 | +| Create a customization file. | None specified. Anyone can create a customization file. | |
| 48 | +| Use the developer portal to upload and apply a YAML file during dev box creation. | Dev Box User | |
| 49 | + |
| 50 | + |
| 51 | +## Create an individual customization file |
| 52 | + |
| 53 | +You can create and manage customization files by using VS Code. You can use the Microsoft Dev Box extension in VS Code to discover the tasks in the attached catalog and test the customization file. |
| 54 | + |
| 55 | +1. Create a dev box (or use an existing dev box) for testing. |
| 56 | +1. On the test dev box, install VS Code and then install the [Dev Box extension](https://marketplace.visualstudio.com/items?itemName=DevCenter.ms-devbox). |
| 57 | +1. Download an [example YAML customization file](https://aka.ms/devbox/usercustomizations/samplefile) from the samples repository and open it in VS Code. |
| 58 | +1. Discover tasks available in the catalog by using the command palette. Select **View** > **Command Palette** > **Dev Box: List Available Tasks For This Dev Box**. |
| 59 | + |
| 60 | + :::image type="content" source="media/how-to-write-individual-customization-file/dev-box-command-list-tasks.png" alt-text="Screenshot of the Dev Box command palette in Visual Studio Code, showing the command for listing available tasks."::: |
| 61 | + |
| 62 | +1. Test customization in VS Code by using the command palette. Select **View** > **Command Palette** > **Dev Box: Apply Customizations Tasks**. |
| 63 | + |
| 64 | + :::image type="content" source="media/how-to-write-individual-customization-file/dev-box-command-apply-tasks.png" alt-text="Screenshot of the Dev Box command palette in Visual Studio Code, showing the command for applying customization tasks."::: |
| 65 | + |
| 66 | +1. The customization file runs and applies the specified tasks to your test dev box. Inspect the changes, and check the VS Code terminal for any errors or warnings generated during the task execution. Review the VS Code terminal for errors or warnings during task execution. |
| 67 | + |
| 68 | +1. When the customization file runs successfully, upload it to your catalog. |
| 69 | + |
| 70 | +### Optional: Customize your dev box by using existing WinGet Configuration files |
| 71 | + |
| 72 | +WinGet configuration takes a config-as-code approach to defining the unique sets of software and configuration settings needed to get your Windows environment in a ready-to-code state. You can also use these configuration files to set up a dev box, by using a WinGet task included in the Microsoft-provided quickstart catalog. |
| 73 | + |
| 74 | +This example shows a dev box customization file that uses an existing WinGet Desired State Configuration (DSC) file: |
| 75 | + |
| 76 | +```yml |
| 77 | +tasks: |
| 78 | + - name: winget |
| 79 | + parameters: |
| 80 | + configure: "projectConfiguration.dsc.yaml" |
| 81 | +``` |
| 82 | +
|
| 83 | +To learn more, see [WinGet configuration](https://aka.ms/winget-configuration). |
| 84 | +
|
| 85 | +## Create a dev box using an individual customization file |
| 86 | +
|
| 87 | +You can use an individual customization file by uploading it from a local drive when creating your dev box, or by downloading it from a repository. |
| 88 | +Customization files stored in a repository must be called *workload.yaml*. Customization files that are stored locally for upload should be called *myfilename.yaml*. Name customization files stored locally for upload as *myfilename.yaml*. |
| 89 | +
|
| 90 | +### Upload a file |
| 91 | +1. In the [developer portal](https://aka.ms/devbox-portal), select **New** > **New dev box**. |
| 92 | +1. In the **Add a dev box** pane, add details for you dev box. |
| 93 | +1. Select **Apply customizations**, and then select **Continue**. |
| 94 | +
|
| 95 | + :::image type="content" source="media/how-to-write-individual-customization-file/add-dev-box-individual-customization.png" alt-text="Screenshot of the Add a dev box pane in the developer portal, showing the option to apply customizations."::: |
| 96 | + |
| 97 | +1. Select **Upload a customization file(s)**, select **Add customizations from file**, and then browse to and select your *myfilename.yaml* file. |
| 98 | +
|
| 99 | + :::image type="content" source="media/how-to-write-individual-customization-file/customize-dev-box-upload.png" alt-text="Screenshot of the Upload a customization file section in the developer portal, showing the option to add customizations from a file."::: |
| 100 | + |
| 101 | +1. To verify that the tasks in your customizations file will be applied correctly, you must validate them before you can proceed. Select **Validate**. |
| 102 | +
|
| 103 | + :::image type="content" source="media/how-to-write-individual-customization-file/customize-dev-box-validate.png" alt-text="Screenshot of the Validate button in the developer portal, showing the option to validate the customization file before proceeding."::: |
| 104 | + |
| 105 | +1. Review the dev box creation summary, and then select **Create**. |
| 106 | + |
| 107 | + :::image type="content" source="media/how-to-write-individual-customization-file/customized-dev-box-create.png" alt-text="Screenshot of the dev box creation summary page in the developer portal, showing the option to create a customized dev box."::: |
| 108 | +
|
| 109 | +### Get a file from a repository |
| 110 | +1. In the [developer portal](https://aka.ms/devbox-portal), select **New** > **New dev box**. |
| 111 | +1. In the **Add a dev box** pane, add details for you dev box. |
| 112 | +1. Select **Apply customizations**, and then select **Continue**. |
| 113 | +
|
| 114 | + :::image type="content" source="media/how-to-write-individual-customization-file/add-dev-box-individual-customization.png" alt-text="Screenshot of the Add a dev box pane in the developer portal, showing the option to apply customizations."::: |
| 115 | + |
| 116 | +1. Select **Upload a customization file(s)**, select **Choose a customization file from a repository**, and then enter the URL for the repository that stores your *workload.yaml* file. |
| 117 | +
|
| 118 | + :::image type="content" source="media/how-to-write-individual-customization-file/customize-dev-box-from-repository.png" alt-text="Screenshot of the Choose a customization file from a repository section in the developer portal, showing the option to enter a repository URL."::: |
| 119 | + |
| 120 | +1. To verify that the tasks in your customizations file will be applied correctly, you must validate them before you can proceed. Select **Validate**. |
| 121 | +
|
| 122 | + :::image type="content" source="media/how-to-write-individual-customization-file/customize-dev-box-validate.png" alt-text="Screenshot of the Validate button in the developer portal, showing the option to validate the customization file before proceeding."::: |
| 123 | + |
| 124 | +1. Review the dev box creation summary, and then select **Create**. |
| 125 | + |
| 126 | + :::image type="content" source="media/how-to-write-individual-customization-file/customized-dev-box-create.png" alt-text="Screenshot of the dev box creation summary page in the developer portal, showing the option to create a customized dev box."::: |
| 127 | +
|
| 128 | +## Related content |
| 129 | +
|
| 130 | +- [Microsoft Dev Box team customizations](concept-what-are-team-customizations.md) |
| 131 | +- [Configure imaging for Dev Box team customizations](how-to-configure-customization-imaging.md) |
| 132 | +- [Add and configure a catalog from GitHub or Azure Repos](../deployment-environments/how-to-configure-catalog.md) |
0 commit comments