You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Learn how to create a repository for managing and sharing Dev Box images.'
4
+
description: Learn how to create a repository for managing and sharing Dev Box images.
5
5
services: dev-box
6
6
ms.service: dev-box
7
7
author: RoseHJM
@@ -10,145 +10,158 @@ ms.date: 10/17/2022
10
10
ms.topic: how-to
11
11
---
12
12
13
-
# Configure an Azure Compute Gallery
13
+
# Configure Azure Compute Gallery
14
14
15
-
An Azure Compute Gallery is a repository in Azure for managing and sharing images. It's stored in your Azure subscription and helps you build structure and organization around your image resources. You can use Azure Compute Gallery to provide custom images for your dev box users.
15
+
Azure Compute Gallery is a service for managing and sharing images. A gallery is a repository that's stored in your Azure subscription and helps you build structure and organization around your image resources. You can use a gallery to provide custom images for your dev box users.
16
16
17
17
Advantages of using a gallery include:
18
+
18
19
- You maintain the images in a single location and use them across dev centers, projects, and pools.
19
-
- Development teams can use the *latest* image version of an image definition to ensure they always receive the most recent image when creating dev boxes.
20
-
- Development teams can use a specific image version to standardize on a supported image version until a newer version is validated.
20
+
- Development teams can use the latestversion of an image definition to ensure that they always receive the most recent image when creating dev boxes.
21
+
- Development teams can standardize on a supported image version until a newer version is validated.
21
22
23
+
To learn more about Azure Compute Gallery and how to create galleries, see:
22
24
23
-
You can learn more about Azure Compute Galleries and how to create them here:
24
-
-[Store and share images in an Azure Compute Gallery](../virtual-machines/shared-image-galleries.md)
25
-
-[Create a gallery for storing and sharing resources](../virtual-machines/create-gallery.md#create-a-gallery-for-storing-and-sharing-resources)
25
+
-[Store and share images in Azure Compute Gallery](../virtual-machines/shared-image-galleries.md)
26
+
-[Create a gallery for storing and sharing resources](../virtual-machines/create-gallery.md#create-a-gallery-for-storing-and-sharing-resources)
26
27
27
-
## Pre-requisites
28
-
- A dev center. If don't have an available dev center, follow these steps: [Create a dev center](./quickstart-configure-dev-box-service.md#create-a-dev-center).
29
-
- An Azure Compute Gallery. In order to use this gallery to configure Dev Box definitions, it must have at least [one image definition and one image version](../virtual-machines/image-version.md).
30
-
- The image definition must have [Trusted Launch enabled as the Security Type](../virtual-machines/trusted-launch.md). You configure the security type when creating the image definition.
31
-
- The image version must meet the [Windows 365 image requirements](/windows-365/enterprise/device-images#image-requirements).
32
-
- Generation 2
33
-
- Hyper-V v2
34
-
- Windows OS
35
-
- Generalized image
36
-
- Single Session VM images (multi-session isn’t supported).
37
-
- No recovery partition.
38
-
- Default 64-GB OS disk size. The OS disk size will be automatically adjusted to the size specified in SKU description of the Windows 365 license.
28
+
## Prerequisites
39
29
40
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/image-definition.png" alt-text="Screenshot showing the Windows 365 image requirement settings.":::
30
+
- A dev center. If you don't have one available, follow the steps in [Create a dev center](./quickstart-configure-dev-box-service.md#create-a-dev-center).
31
+
- A compute gallery. For you to use a gallery to configure dev box definitions, it must have at least [one image definition and one image version](../virtual-machines/image-version.md):
32
+
- The image definition must have [trusted launch enabled as the security type](../virtual-machines/trusted-launch.md). You configure the security type when you create the image definition.
33
+
- The image version must meet the [Windows 365 image requirements](/windows-365/enterprise/device-images#image-requirements):
- Default 64-GB OS disk size. The OS disk size is automatically adjusted to the size specified in the SKU description of the Windows 365 license.
41
41
42
-
> [!IMPORTANT]
43
-
> If you have existing images that do not meet the Windows 365 image requirements, those images will not be listed for image creation.
42
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/image-definition.png" alt-text="Screenshot that shows Windows 365 image requirement settings.":::
44
43
45
44
> [!NOTE]
46
-
> Microsoft Dev Box Preview doesn't support community galleries.
45
+
> - If you have existing images that don't meet the Windows 365 image requirements, those images won't be listed for image creation.
46
+
> - Microsoft Dev Box Preview doesn't support community galleries.
47
47
48
48
## Provide permissions for services to access the gallery
49
-
When using an Azure Compute Gallery image to create a dev box definition, the Windows 365 service validates the image to ensure that it meets the requirements to be provisioned for a dev box. In addition, the Dev Box service replicates the image to the regions specified in the attached network connections so the images are present in the region required for dev box creation.
50
49
51
-
To allow the services to perform these actions, you must provide permissions to your gallery as follows:
50
+
When you use an Azure Compute Gallery image to create a dev box definition, the Windows 365 service validates the image to ensure that it meets the requirements to be provisioned for a dev box. The Dev Box Preview service replicates the image to the regions specified in the attached network connections, so the images are present in the region that's required for dev box creation.
51
+
52
+
To allow the services to perform these actions, you must provide permissions to your gallery as follows.
53
+
54
+
### Add a user-assigned identity to the dev center
52
55
53
-
### Add a user assigned identity to dev center
54
-
1. Use these steps to [Create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity).
56
+
1.[Follow the steps to create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity).
55
57
1. Sign in to the [Azure portal](https://portal.azure.com).
56
-
1. In the search box, type *Dev box* and select **Dev centers** from the list.
57
-
1. Open your DevCenter and select **Identity** from the left menu.
58
+
1. In the search box, enter **dev box**. In the list of results, select **Dev centers**.
59
+
1. Open your dev center. On the left menu, select **Identity**.
58
60
1. On the **User assigned** tab, select **+ Add**.
59
-
1. In Add user assigned managed identity, select the user-assigned managed identity that you created in step 1 and then select **Add**.
61
+
1. In **Add user assigned managed identity**, select the user-assigned managed identity that you created in step 1, and then select **Add**.
62
+
63
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/assign-managed-id.png" alt-text="Screenshot that shows the pane for adding a user-assigned managed identity.":::
64
+
65
+
### Assign roles
60
66
61
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/assign-managed-id.png" alt-text="Screenshot showing the Add user assigned managed identity pane, with the managed ID highlighted.":::
67
+
The Dev Box service behaves differently depending how you attach your gallery:
62
68
63
-
### How does the Dev Box service assign permissions?
64
-
The Dev Box service behaves differently depending how you attach your gallery.
65
-
- When you use the Azure portal to attach the gallery to your Dev center, the Dev Box service creates the necessary role assignments automatically when you attach the gallery.
66
-
- When you use the CLI to attach the gallery to your Dev center, you must manually create the Windows 365 Service Principal and dev center Managed Identity role assignments before attempting to attach the gallery.
69
+
- When you use the Azure portal to attach the gallery to your dev center, the Dev Box service creates the necessary role assignments automatically after you attach the gallery.
70
+
- When you use the Azure CLI to attach the gallery to your dev center, you must manually create the Windows 365 service principal and the dev center's managed identity role assignments before you attach the gallery.
67
71
68
-
Follow these steps to manually assign each role:
72
+
Use the following steps to manually assign each role.
73
+
74
+
#### Windows 365 service principal
69
75
70
-
#### Windows 365 Service Principal
71
76
1. Sign in to the [Azure portal](https://portal.azure.com).
72
77
73
-
1. In the search box, type *Azure Compute Gallery* and select the gallery you want to attach to the dev center.
78
+
1. In the search box, enter **Azure Compute Gallery**. In the list of results, select the gallery that you want to attach to the dev center.
74
79
75
-
1.Select the **Access Control (IAM)** menu item.
80
+
1.On the left menu, select **Access Control (IAM)**.
76
81
77
82
1. Select **Add** > **Add role assignment**.
78
83
79
84
1. Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
80
-
81
-
| Setting | Value |
82
-
| --- | --- |
83
-
|**Role**| Select **Reader**. |
84
-
|**Assign access to**| Select **User, group, or service principal**. |
85
-
|**Members**| Search for and select **Windows 365**. |
86
85
87
-
#### Dev center Managed Identity
88
-
1. Open the gallery you want to attach to the dev center from the [Azure portal](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Compute%2Fgalleries). You can also search for Azure Compute Galleries to find your gallery.
86
+
| Setting | Value |
87
+
| --- | --- |
88
+
|**Role**| Select **Reader**. |
89
+
|**Assign access to**| Select **User, group, or service principal**. |
90
+
|**Members**| Search for and select **Windows 365**. |
91
+
92
+
#### Managed identity for the dev center
93
+
94
+
1. In the [Azure portal](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Compute%2Fgalleries), open the gallery that you want to attach to the dev center. You can also search for **Azure Compute Gallery** to find your gallery.
89
95
90
-
1.Select **Access Control (IAM)** from the left menu.
96
+
1.On the left menu, select **Access Control (IAM)**.
91
97
92
98
1. Select **Add** > **Add role assignment**.
93
99
94
100
1. Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
|**Members**| Search for and select the user assigned managed identity you created in [Add a user assigned identity to dev center](#add-a-user-assigned-identity-to-dev-center). |
101
101
102
-
You can use the same managed identity in multiple DevCenters and Azure Compute Galleries. Any DevCenter with the managed identity added will have the necessary permissions to the images in the Azure Compute Gallery you've added the owner role assignment to.
|**Members**| Search for and select the user-assigned managed identity that you created when you [added a user-assigned identity to the dev center](#add-a-user-assigned-identity-to-dev-center). |
107
+
108
+
You can use the same managed identity in multiple dev centers and compute galleries. Any dev center with the managed identity added will have the necessary permissions to the images in the gallery that you've added the owner role assignment to.
103
109
104
110
## Attach a gallery to a dev center
105
-
In order to use the images from a gallery in dev box definitions, you must first associate it with the dev center.
111
+
112
+
To use the images from a gallery in dev box definitions, you must first associate the gallery with the dev center.
106
113
107
114
1. Sign in to the [Azure portal](https://portal.azure.com).
108
115
109
-
2. In the search box, type *Dev box* and select **Dev centers** from the list.
110
-
111
-
3. Select the dev center you want to attach the gallery to.
112
-
113
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/devcenter-grid.png" alt-text="Screenshot showing the list of existing dev centers.":::
116
+
2. In the search box, enter **dev box**. In the list of results, select **Dev centers**.
114
117
115
-
4. From the left menu, select **Azure compute galleries** to list the galleries attached to this dev center.
116
-
117
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-grid-empty.png" alt-text="Screenshot showing the Azure compute galleries page. There are no existing Azure compute galleries.":::
118
+
3. Select the dev center that you want to attach the gallery to.
119
+
120
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/devcenter-grid.png" alt-text="Screenshot that shows a list of existing dev centers.":::
121
+
122
+
4. On the left menu, select **Azure compute galleries** to list the galleries that are attached to this dev center.
123
+
124
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-grid-empty.png" alt-text="Screenshot that shows the page for compute galleries, with no galleries listed.":::
118
125
119
126
5. Select **+ Add** to select a gallery to attach.
120
127
121
-
6. In Add Azure compute gallery, select your gallery. If you have access to more than one gallery with the same name, the subscription name is shown in parentheses.
122
-
123
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-add.png" alt-text="Screenshot showing the Select a Gallery to add option.":::
128
+
6. In **Add Azure compute gallery**, select your gallery. If you have access to more than one gallery that has the same name, the subscription name appears in parentheses.
124
129
125
-
7. If there's a name conflict in the dev center, then you must provide a unique name to use for this gallery.
130
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-add.png" alt-text="Screenshot that shows the area for selecting a gallery.":::
131
+
132
+
7. If there's a name conflict in the dev center, you must provide a unique name to use for this gallery.
126
133
127
134
8. Select **Add**.
128
135
129
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-grid.png" alt-text="Screenshot showing the Azure compute galleries page with example galleries listed.":::
136
+
Your gallery now appears on the **Azure compute galleries** page.
137
+
138
+
:::image type="content" source="media/how-to-configure-azure-compute-gallery/gallery-grid.png" alt-text="Screenshot that shows the page for compute galleries page with example galleries listed.":::
130
139
131
-
After successful addition, the images in the gallery will be available to select from when creating and updating dev box definitions.
140
+
After you successfully add a gallery, the images in it will be available to select from when you're creating and updating dev box definitions.
132
141
133
142
## Remove a gallery from a dev center
134
-
You can detach galleries from dev centers so that their images can no longer be used to create dev box definitions in the dev center. Galleries that are being actively used in dev box definitions cannot be removed from the dev center. The associated dev box definition must be deleted or updated to use an image from a different gallery before you can remove the gallery.
143
+
144
+
You can detach galleries from dev centers so that their images can no longer be used to create dev box definitions.
145
+
146
+
> [!NOTE]
147
+
> You can't remove galleries that are being actively used in dev box definitions. Before you can remove such a gallery, you must delete the associated dev box definition or update the definition to use an image from a different gallery.
135
148
136
149
1. Sign in to the [Azure portal](https://portal.azure.com).
137
150
138
-
2. In the search box, type *Dev box* and select **Dev centers** from the list.
139
-
140
-
3. Select the dev center you want to remove the gallery from.
151
+
2. In the search box, enter **dev box**. In the list of results, select **Dev centers**.
141
152
142
-
4. From the left menu, select **Azure compute galleries**to list the galleries attached to this dev center.
153
+
3. Select the dev center that you want to remove the gallery from.
143
154
144
-
5. Select the gallery you want to remove, and then select **Remove**.
155
+
4. On the left menu, select **Azure compute galleries** to list the galleries that are attached to this dev center.
145
156
146
-
:::image type="content" source="media/how-to-configure-azure-compute-gallery/remove-gallery-from-devcenter.png" alt-text="Screenshot showing the Azure compute galleries page with a gallery selected and the Remove button highlighted.":::
157
+
5. Select the gallery that you want to remove, and then select **Remove**.
:::image type="content" source="media/how-to-configure-azure-compute-gallery/remove-gallery-from-devcenter.png" alt-text="Screenshot that shows the page for compute galleries, a selected gallery, and the Remove button.":::
149
160
150
-
The gallery will be detached from the dev center. The gallery and its images won't be deleted, and you can reattach it if necessary.
161
+
6. In the confirmation dialog, select **Continue**.
162
+
163
+
The gallery is detached from the dev center. The gallery and its images aren't deleted, and you can reattach it if necessary.
151
164
152
165
## Next steps
153
-
Learn more about Microsoft Dev Box Preview:
154
-
-[Microsoft Dev Box Preview key concepts](./concept-dev-box-concepts.md)
166
+
167
+
-Learn more about [key concepts in Microsoft Dev Box Preview](./concept-dev-box-concepts.md).
0 commit comments