Debian 10, nicknamed as buster has reached its end of life. If you need to start a new VM using this OS to run your legacy app, these instructions might help.
wget, tar, qemu-img, statwget https://cloud.debian.org/images/cloud/buster/latest/debian-10-azure-amd64.tar.xz
disk.raw file
tar -xf debian-10-azure-amd64.tar.xz
Convert the disk to VHD format that is compatible with Azure disks
MB=$((1024 * 1024))
RAW_SIZE=$(stat -c%s "disk.raw")
ROUNDED_SIZE=$((($RAW_SIZE/$MB + 1)*$MB))
disk.raw is a multiple of 1 MB (required by Azure)
qemu-img resize -f raw disk.raw $ROUNDED_SIZE
disk.raw to fixed-size debian-buster.vhd
qemu-img convert -f raw -o subformat=fixed,force_size -O vpc disk.raw debian-buster.vhd
export CHOSEN_GROUP=chosen-group-name
export CHOSEN_LOCATION=chosen-location-eg-centralus
az disk create \
--resource-group $CHOSEN_GROUP \
--name debian-buster-os-disk \
--location $CHOSEN_LOCATION \
--upload-type Upload \
--upload-size-bytes $ROUNDED_SIZE \
--sku Standard_LRS
SAS_URL=$( \
az disk grant-access \
--resource-group $CHOSEN_GROUP \
--name debian-buster-os-disk \
--access-level Write \
--duration-in-seconds 3600)
debian-buster.vhd content to the disk container
azcopy copy --blob-type PageBlob "debian-buster.vhd" "${SAS_URL}"
az disk revoke-access --resource-group $CHOSEN_GROUP --name debian-buster-os-disk
az image create \
--resource-group $CHOSEN_GROUP \
--location $CHOSEN_LOCATION \
--name DebianBusterCustomOSImage \
--source debian-buster-os-disk \
--os-type Linux
az disk delete --resource-group $CHOSEN_GROUP --name debian-buster-os-disk
DebianBusterCustomOSImage visible in the azure portal? If yes, use it with the portal to launch VMs just like any other OS for the vm.apt update to work on the Debian buster VMOnce VM is started and you are able to login to it, if you try apt update command, it fails. This is because it trying to pull packages lists from locations that are no more there.
To fix this, edit /etc/apt/sources.list file and make sure that all source urls are pointing towards archive.debian.org. Once done, save the file and enjoy apt updates as normal.