How to change a VM's disk to a smaller, lower-cost disk? Como alterar o disco de uma VM para um outro disco menor e com menor custo?

GABRIEL COSTA AMARAL 21 Reputation points
2021-04-19T01:06:17.823+00:00

Como alterar o disco de uma VM para um outro disco menor e com menor custo? Quero trocar um P10 por um S6, mas sem perder os dados.

Obrigado.

How to change a VM's disk to a smaller, lower-cost disk? I want to exchange a P10 for an S6, but without losing data.

Tanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,974 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,664 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
642 questions
{count} votes

Accepted answer
  1. Olga Os - MSFT 5,921 Reputation points Microsoft Employee
    2021-04-19T02:44:33.49+00:00

    Hello @GABRIEL COSTA AMARAL ,

    As you know, shrinking/decreasing an existing disk isn’t supported in the Azure, and can potentially result in the data loss. It's only possible to increase the size of a disk but not decrease it.

    The same can be confirmed there: "How to expand the OS drive of a virtual machine"

    A workaround would be for you:

    1) Create a smaller disk. Attach it to a VM.
    2) Move all the data to a new smaller disk, test it.
    3) Detach and delete the bigger disk.

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards,
    Olga


1 additional answer

Sort by: Most helpful
  1. WhTurner 1,611 Reputation points
    2021-04-19T09:22:02.213+00:00

    But this question doesn't belong in this Small Basic programming language forum. Please remove the tag small-basix-discussion


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.