|
1 | 1 | ---
|
2 |
| -title: Recommended approaches for creating custom images for labs |
3 |
| -description: Describes approaches for creating custom images for labs. |
4 |
| -ms.date: 07/27/2021 |
| 2 | +title: Recommendation for creating custom images |
| 3 | +titleSuffix: Azure Lab Services |
| 4 | +description: Describes approaches for creating custom virtual machine images for labs in Azure Lab Services. |
| 5 | +services: lab-services |
| 6 | +ms.service: lab-services |
| 7 | +author: ntrogh |
| 8 | +ms.author: nicktrog |
| 9 | +ms.date: 04/24/2023 |
5 | 10 | ms.topic: conceptual
|
6 | 11 | ---
|
7 | 12 |
|
8 |
| -# Recommended approaches for creating custom images |
9 |
| -This article describes the following recommended approaches for creating a custom image: |
| 13 | +# Recommended approaches for creating custom images for Azure Lab Services labs |
| 14 | + |
| 15 | +This article describes recommended approaches for creating a custom image for Azure Lab Services labs. Learn how you can create a save a custom image from an existing lab template virtual machine, or import a virtual machine image from an Azure VM or physical lab environment. |
10 | 16 |
|
11 | 17 | - Create and save a custom image from a [lab's template virtual machine (VM)](how-to-create-manage-template.md).
|
12 | 18 | - Bring a custom image from outside of the context of a lab by using:
|
13 | 19 | - An [Azure VM](https://azure.microsoft.com/services/virtual-machines/).
|
14 | 20 | - A VHD in your physical lab environment.
|
15 | 21 |
|
16 |
| -## Save a custom image from a lab's template VM |
| 22 | +## Save a custom image from a lab template virtual machine |
| 23 | + |
| 24 | +The easiest way to create a custom virtual machine image for labs is to export an existing lab template virtual machine in the Azure portal. |
17 | 25 |
|
18 |
| -Using a lab's template VM to create and save a custom image is the simplest way to create an image because it's supported by using the Azure Lab Services portal. As a result, both IT departments and educators can create custom images by using a lab's template VM. |
| 26 | +For example, you can start to create a new lab with one of the Azure Marketplace images, and then install extra software applications and tooling in the [template VM](./how-to-create-manage-template.md) that are needed for a class. After you've finished setting up the template VM, you can save it in the [connected compute gallery](how-to-attach-detach-shared-image-gallery.md), for others to use for creating new labs. |
19 | 27 |
|
20 |
| -For example, you can start with one of the Azure Marketplace images and then install the software applications and tooling that are needed for a class. After you've finished setting up the image, you can save it in the [connected compute gallery](how-to-attach-detach-shared-image-gallery.md) so that you and other educators can use the image to create new labs. |
| 28 | +You can use a lab's template VM to create either Windows or Linux custom images. For more information, see [Save an image to a compute gallery](how-to-use-shared-image-gallery.md#save-an-image-to-a-compute-gallery) |
21 | 29 |
|
22 | 30 | There are a few key points to be aware of with this approach:
|
23 | 31 |
|
24 |
| -- Lab Services automatically saves a *specialized* image when you export the image from the template VM. In most cases, specialized images are well suited for creating new labs because the image retains machine-specific information and user profiles. Using a specialized image helps to ensure that the installed software will run the same when you use the image to create new labs. If you need to create a *generalized* image, you must use one of the other recommended approaches in this article to create a custom image. |
| 32 | +- Azure Lab Services automatically saves a *specialized* image when you export the image from the template VM. In most cases, specialized images are well suited for creating new labs because the image retains machine-specific information and user profiles. Using a specialized image helps to ensure that the installed software runs the same when you use the image to create new labs. If you need to create a *generalized* image, you must use one of the other recommended approaches in this article to create a custom image. |
25 | 33 |
|
26 | 34 | You can create labs based on both generalized and specialized images in Azure Lab Services. For more information about the differences, see [Generalized and specialized images](../virtual-machines/shared-image-galleries.md#generalized-and-specialized-images).
|
27 | 35 |
|
28 |
| -- For more advanced scenarios with setting up your image, you might find it helpful to instead create an image outside of labs by using either an Azure VM or a VHD from your physical lab environment. Read the next sections for more information. |
29 |
| - |
30 |
| -### Use a lab's template VM to save a custom image |
31 |
| - |
32 |
| -You can use a lab's template VM to create either Windows or Linux custom images. For more information, see [Save an image to a compute gallery](how-to-use-shared-image-gallery.md#save-an-image-to-a-compute-gallery) |
| 36 | +- For more advanced scenarios with setting up your image, you might instead create an image outside of Azure Lab Services by using either an Azure VM or a VHD from your physical lab environment. For example, if you need to use virtual machine extensions. |
33 | 37 |
|
34 | 38 | ## Bring a custom image from an Azure VM
|
35 | 39 |
|
36 |
| -Another approach is to use an Azure VM to set up a custom image. After you've finished setting up the image, you can save it to a compute gallery so that you and your colleagues can use the image to create new labs. |
| 40 | +Another approach to set up a custom image is to use an Azure VM. After you've finished setting up the image, you can save it to a compute gallery so that you can use the image to create new labs. |
37 | 41 |
|
38 | 42 | Using an Azure VM gives you more flexibility:
|
39 | 43 |
|
40 |
| -- You can create either [generalized or specialized](../virtual-machines/shared-image-galleries.md#generalized-and-specialized-images) images. Otherwise, if you use a lab's template VM to [export an image](how-to-use-shared-image-gallery.md) the image is always specialized. |
41 |
| -- You have access to more advanced features of an Azure VM that might be helpful for setting up an image. For example, you can use [extensions](../virtual-machines/extensions/overview.md) to do post-deployment configuration and automation. Also, you can access the VM's [boot diagnostics](../virtual-machines/boot-diagnostics.md) and [serial console](/troubleshoot/azure/virtual-machines/serial-console-overview). |
| 44 | +- You can create either [generalized or specialized](/azure/virtual-machines/shared-image-galleries#generalized-and-specialized-images) images. Otherwise, if you use a lab template VM to [export an image](how-to-use-shared-image-gallery.md) the image is always specialized. |
42 | 45 |
|
43 |
| -Setting up an image by using an Azure VM is more complex. As a result, IT departments are typically responsible for creating custom images on Azure VMs. |
| 46 | +- You have access to more advanced features of an Azure VM that might be helpful for setting up an image. For example, you can use [extensions](/azure/virtual-machines/extensions/overview) to do post-deployment configuration and automation. Also, you can access the VM's [boot diagnostics](/azure/virtual-machines/boot-diagnostics) and [serial console](/troubleshoot/azure/virtual-machines/serial-console-overview). |
| 47 | + |
| 48 | +The process for setting up an image by using an Azure VM is more complex. As a result, IT departments are typically responsible for creating custom images on Azure VMs. |
44 | 49 |
|
45 | 50 | ### Use an Azure VM to set up a custom image
|
46 | 51 |
|
47 |
| -Here are the high-level steps to bring a custom image from an Azure VM: |
| 52 | +To create a custom image from an Azure virtual machine: |
| 53 | + |
| 54 | +1. Create an [Azure VM](https://azure.microsoft.com/services/virtual-machines/) by using a Windows or Linux Azure Marketplace image. |
48 | 55 |
|
49 |
| -1. Create an [Azure VM](https://azure.microsoft.com/services/virtual-machines/) by using a Windows or Linux Marketplace image. |
50 | 56 | 1. Connect to the Azure VM and install more software. You can also make other customizations that are needed for your lab.
|
51 |
| -1. When you've finished setting up the image, [save the VM's image to a compute gallery](../virtual-machines/image-version.md). As part of this step, you'll also need to create the image's definition and version. |
52 |
| -1. After the custom image is saved in the gallery, you can use your image to create new labs. |
53 | 57 |
|
| 58 | +1. When you've finished setting up the image, [save the VM image to a compute gallery](/azure/virtual-machines/image-version). As part of this step, you also need to create the image definition and version. |
54 | 59 |
|
55 |
| -The steps vary depending on if you're creating a custom Windows or Linux image. Read the following articles for the detailed steps: |
| 60 | +1. After you save the custom image in the gallery, use your image to create new labs. |
| 61 | + |
| 62 | +The steps might vary depending on if you're creating a custom Windows or Linux image. Read the following articles for the detailed steps: |
56 | 63 |
|
57 | 64 | - [Bring a custom Windows image from an Azure VM](how-to-bring-custom-windows-image-azure-vm.md)
|
58 | 65 | - [Bring a custom Linux image from an Azure VM](how-to-bring-custom-linux-image-azure-vm.md)
|
59 | 66 |
|
60 | 67 | ## Bring a custom image from a VHD in your physical lab environment
|
61 | 68 |
|
62 |
| -The third approach to consider is to bring a custom image from a VHD in your physical lab environment to a compute gallery. After the image is in a compute gallery, you and other educators can use the image to create new labs. |
| 69 | +Another approach is to import a custom image from a virtual hard drive (VHD) in your physical lab environment to an Azure compute gallery. After the image is in a compute gallery, you can use it to create new labs. |
63 | 70 |
|
64 |
| -Here are a few reasons why you might want to use this approach: |
| 71 | +The reasons you might import a custom image from a physical environment are: |
65 | 72 |
|
66 | 73 | - You can create either [generalized or specialized](../virtual-machines/shared-image-galleries.md#generalized-and-specialized-images) images to use in your labs. Otherwise, if you use a [lab's template VM](how-to-use-shared-image-gallery.md) to export an image, the image is always specialized.
|
67 |
| -- You can access resources that exist within your on-premises environment. For example, you might have large installation files in your on-premises environment that are too time consuming to copy to a lab's template VM. |
| 74 | + |
| 75 | +- You can access resources that exist within your on-premises environment during the VM configuration. For example, you might have large installation files in your on-premises environment that are too time-consuming to copy to a lab template VM. |
| 76 | + |
68 | 77 | - You can upload images created by using other tools, such as [Microsoft Configuration Manager](/mem/configmgr/core/understand/introduction), so that you don't have to manually set up an image by using a lab's template VM.
|
69 | 78 |
|
70 |
| -Bringing a custom image from a VHD is the most advanced approach because you must ensure that the image is set up properly so that it works within Azure. As a result, IT departments are typically responsible for creating custom images from VHDs. |
| 79 | +Bringing a custom image from a VHD is the most advanced approach because you must ensure that the image is set up properly to function in Azure. As a result, IT departments are typically responsible for creating custom images from VHDs. |
71 | 80 |
|
72 | 81 | ### Bring a custom image from a VHD
|
73 | 82 |
|
74 |
| -Here are the high-level steps to bring a custom image from a VHD: |
| 83 | +Follow these steps to import a custom image from a VHD: |
75 | 84 |
|
76 | 85 | 1. Use [Windows Hyper-V](/virtualization/hyper-v-on-windows/about/) on your on-premises machine to create a Windows or Linux VHD.
|
| 86 | + |
77 | 87 | 1. Connect to the Hyper-V VM and install more software. You can also make other customizations that are needed for your lab.
|
| 88 | + |
78 | 89 | 1. When you've finished setting up the image, upload the VHD to create a [managed disk](../virtual-machines/managed-disks-overview.md) in Azure.
|
| 90 | + |
79 | 91 | 1. From the managed disk, create the [image's definition](../virtual-machines/shared-image-galleries.md#image-definitions) and version in a compute gallery.
|
80 |
| -1. After the custom image is saved in the gallery, you can use the image to create new labs. |
| 92 | + |
| 93 | +1. After you saved the custom image in the gallery, you can use the image to create new labs. |
81 | 94 |
|
82 | 95 | The steps vary depending on if you're creating a custom Windows or Linux image. Read the following articles for the detailed steps:
|
83 | 96 |
|
|
0 commit comments