Azure vm image builder
Azure vm image builder is used to create image with pre-configure softwares and applications
azure cli
choco install azure-cli -y
az login
- owner/contrubutor or admin
Pre-requisities:
- vm-images
- compute
- network
- keyvalut
- storage
az provider register -n Microsoft.VirtualMachineImages
az provider register -n Microsoft.Storage
az provider register -n Microsoft.Compute
az provider register -n Microsoft.KeyVault
az provider register -n Microsoft.Network
# validate
az provider show -n Microsoft.Compute -o table
#!/bin/bash
# Update package lists
sudo apt-get update -y
# Install Apache2 web server
sudo apt-get install apache2 -y
# Enable Apache2 to start on boot
sudo systemctl enable apache2
# Start Apache2 service immediately
sudo systemctl start apache2
# Print status
sudo systemctl status apache2
