@George Chrysovalantis Grammatikos
@Pradeep Kommaraju
I tried the force delete option, but I do not think it is doing anything. The deletion is still not completed after 30 minutes, but I will give it more time.
Do I need to shutdown the resources first? Do I need to specify force deletion other resources too?
$ az vm list --resource-group MyResourceGroup --show-details
[
{
"additionalCapabilities": null,
"applicationProfile": null,
"availabilitySet": null,
"billingProfile": null,
"capacityReservation": null,
"diagnosticsProfile": null,
"evictionPolicy": null,
"extendedLocation": null,
"extensionsTimeBudget": null,
"fqdns": "",
"hardwareProfile": {
"vmSize": "Standard_DS1_v2",
"vmSizeProperties": null
},
"host": null,
"hostGroup": null,
"id": "/subscriptions/<omitted_id>/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"identity": null,
"licenseType": null,
"location": "eastus",
"macAddresses": "00-22-48-21-FE-E2",
"name": "myVM",
"networkProfile": {
"networkApiVersion": null,
"networkInterfaceConfigurations": null,
"networkInterfaces": [
{
"deleteOption": null,
"id": "/subscriptions/<omitted_id>/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myVMVMNic",
"primary": null,
"resourceGroup": "myResourceGroup"
}
]
},
"osProfile": {
"adminPassword": null,
"adminUsername": "azureuser",
"allowExtensionOperations": true,
"computerName": "myVM",
"customData": null,
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"enableVMAgentPlatformUpdates": false,
"patchSettings": {
"assessmentMode": "ImageDefault",
"automaticByPlatformSettings": null,
"patchMode": "ImageDefault"
},
"provisionVmAgent": true,
"ssh": {
"publicKeys": [
{
"keyData": "<omitted-ssh-rsa>",
"path": "/home/azureuser/.ssh/authorized_keys"
}
]
}
},
"requireGuestProvisionSignal": true,
"secrets": [],
"windowsConfiguration": null
},
"plan": null,
"platformFaultDomain": null,
"powerState": "VM running",
"priority": null,
"privateIps": "10.0.0.4",
"provisioningState": "Succeeded",
"proximityPlacementGroup": null,
"publicIps": "<omitted-public-ip>",
"resourceGroup": "MyResourceGroup",
"resources": null,
"scheduledEventsProfile": null,
"securityProfile": null,
"storageProfile": {
"dataDisks": [],
"imageReference": {
"communityGalleryImageId": null,
"exactVersion": "0.20220911.1135",
"id": null,
"offer": "debian-10",
"publisher": "Debian",
"sharedGalleryImageId": null,
"sku": "10",
"version": "latest"
},
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"deleteOption": "Detach",
"diffDiskSettings": null,
"diskSizeGb": 30,
"encryptionSettings": null,
"image": null,
"managedDisk": {
"diskEncryptionSet": null,
"id": "/subscriptions/<omitted_id>/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/<omitted-myVM_disk1>",
"resourceGroup": "myResourceGroup",
"securityProfile": null,
"storageAccountType": "Premium_LRS"
},
"name": "<omitted-myVM_disk1>",
"osType": "Linux",
"vhd": null,
"writeAcceleratorEnabled": null
}
},
"tags": {},
"timeCreated": "2022-09-15T17:07:10.911524+00:00",
"type": "Microsoft.Compute/virtualMachines",
"userData": null,
"virtualMachineScaleSet": null,
"vmId": "<omitted-vmId>",
"zones": null
}
]
$ az group delete -n MyResourceGroup --force-deletion-types Microsoft.Compute/virtualMachines