Skip to content

Instantly share code, notes, and snippets.

@agrawalreetika
Last active February 3, 2020 09:31
Show Gist options
  • Save agrawalreetika/acd34211c32287790f0d2bcb8a89d00b to your computer and use it in GitHub Desktop.
Save agrawalreetika/acd34211c32287790f0d2bcb8a89d00b to your computer and use it in GitHub Desktop.
This includes steps to create presto worker image.
# De-allocate and generalize the VMs in order to create an image.
# A VM that has been generalized can no longer be restarted.
ResourceGroupName="PrestoResourceGroup"
WorkerName="presto-worker-vm"
ImageName="presto-worker-image"
Subscription="Azure-Subscription-Name"
az vm deallocate \
--subscription $Subscription \
--resource-group $ResourceGroupName \
--name $WorkerName
az vm generalize \
--subscription $Subscription \
--resource-group $ResourceGroupName \
--name $WorkerName
# Create an presto worker image
az image create \
--subscription $Subscription \
--resource-group $ResourceGroupName \
--name $ImageName \
--source $WorkerName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment