A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
Hi @Bilocca Glenn ,
it's not possible to detach the OS disk of an Azure VM. The VM object can't "exist" without the OS disk object.
Even this thread started 2019 it is still valid: Can OS disk be detached? #22501
You can delete the VM and keep the OS disk. That's the only option I am aware of.
This can be done in the Azure Portal by clicking on Delete and uncheck the option Delete with VM
In AZ CLI you can change the delete behavior of an existing Azure VM before you delete the VM:
az resource update --resource-group myResourceGroup --name myVM --resource-type virtualMachines --namespace Microsoft.Compute --set properties.storageProfile.osDisk.deleteOption=detach
Source: Update the delete behavior on an existing VM
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards Andreas Baumgarten