Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Azure Storage: FAQ

Can u attach azure vm or you can’t attach disks to a running VM?

No, you cannot attach a data disk to an Azure virtual machine that is running. The VM must be stopped before you can attach or detach a data disk. This is because attaching or detaching a data disk involves making changes to the VM’s storage configuration, which can only be done when the VM is not running.

When you attach a data disk to a VM, Azure creates a new disk LUN (logical unit number) and adds it to the VM’s storage configuration. The VM’s operating system then needs to recognize the new disk and make it available for use. This process cannot be done while the VM is running, as it would require the operating system to lock the disk in order to make the changes.

Similarly, when you detach a data disk from a VM, Azure removes the disk LUN from the VM’s storage configuration. The VM’s operating system then needs to release the lock on the disk and make it unavailable for use. This process also cannot be done while the VM is running, as it would require the operating system to lock the disk in order to release the lock.

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x