Your company has a custom Linux VM that they want to redeploy to a virtual machine scale set. You must find an efficient way of redeploying this VM without having to manually install all custom packages and settings.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Start Cloud Shell
- Click the Cloud Shell icon (
>_
) in the upper right. - Select Bash.
- Click Show advanced settings.
- Change Cloud Shell Region to West US.
- For Storage account, select Use existing.
- For File share, select Create new and give it a name of "fileshare".
- Click Create storage.
- Click the Cloud Shell icon (
- Set Resource Variables in Cloud Shell
- In the Azure portal, click the listed resource group name.
- Copy it to your clipboard.
- In Cloud Shell, set the
RG
variable, replacing<RESOURCE_GROUP_NAME>
with the name you just copied. - In the Azure portal, click the virtual machine provisioned with this lab.
- In the left menu, click Properties.
- Scroll down and copy the Resource ID to the clipboard.
- In Cloud Shell, set the
IMAGE
variable, replacing<RESOURCE_ID>
with the name you just copied.
- Create an Image from the VM
- Create an image gallery.
- Create an image definition.
- Create an image version.
- Create a Virtual Machine Scale Set from an Image
- In the Azure portal, scroll the listed resources and click the new image definition file.
- In the left menu, click Properties.
- Scroll down and copy the Resource ID to the clipboard.
- In Cloud Shell, create a VM scale set, replacing
<RESOURCE_ID>
in theimage
variable with the name you just copied.