@João Récio Thanks for providing details.
As mentioned in this article, the limitation is, you can only resize a VM size that has a local temp disk to a VM size with local temp disk; and a VM (with no local temp disk) to a VM (with no local temp disk).
As an example:
DS2_V4 to DS4_V4
DS2_V3 to DS4_V3
In order to be able to perform the resize operation that you want to acquire, I would suggest you the following possible methods depending on what suits you the best:
- Re-create the VM directly with the desired D2s_v4 size.
- Or as an alternative to resize the VM to D4S_V3 size. ( D2S_V3 to D4S_V3 )
- As a workaround, you could create a snapshot from the actual disk. Create a managed disk from the snapshot. After that, create a VM from the managed disk with the D2s_v4 size.
Let me know if you have further questions.
----------
Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.