Attach a Data Disk to Another VM with Minimum Downtime

Answer Correct answer: C — Detach the data disk first, since it can be hot-detached while both VMs remain online, minimizing offline time.

You have an Azure virtual machine (VM) that has a single data disk. You have been tasked with attaching this data disk to another Azure VM. You need to make sure that your strategy allows for the virtual machines to be offline for the least amount of time possible. Which of the following is the action you should take FIRST?

  1. Stop the VM that includes the data disk.
  2. Stop the VM that the data disk must be attached to.
  3. Detach the data disk. Correct Answer
  4. Delete the VM that includes the data disk.

Community Insight

Azure supports hot-detaching a data disk while the source VM keeps running, so the tested knowledge is that no shutdown step is required before moving the disk.

When moving a data disk between Azure VMs, the fastest path is a hot detach: removing the disk from its current VM does not require powering off either machine, so both stay online. The correct first action is to detach the data disk, then attach it to the target VM.

Many learners choose A, believing the source VM must be stopped first to prevent data corruption; Microsoft documentation explicitly supports detaching a data disk from a running VM.

Community Discussion (263 comments)

Devendra M 👍 1 Selected: C
Azure supports hot-detaching data disks, so you can detach the disk from the source VM and attach it to the destination VM without stopping either VM. This minimizes VM downtime. Detaching preserves the disk and its data. Microsoft Learn In practice, first stop applications accessing the disk and safely unmount it or take it offline inside the operating system. Then detach and attach it to the other VM.
UnknownEen 👍 4 Selected: C
C because its a data only disk
GagisaPRO 👍 2 Selected: C
C - tested
Sahar_A 👍 1 Selected: C
No need to shut down any VM, just de-attach the disk
ra_ste_ele 👍 1 Selected: A
Per collegare un disco dati da una VM a un’altra VM su Azure, prima devi scollegarlo dalla VM originale. Tuttavia, non puoi scollegare un disco da una VM in esecuzione, quindi: PRIMA devi arrestare la VM che attualmente utilizza il disco dati. ✅ Procedura tipica: Arresta la VM originale (che ha il disco dati) → ✔️ Risposta A Scollega il disco dati da quella VM Collega il disco alla nuova VM (anche mentre è in esecuzione) Avvia entrambe le VM se necessario Montaggio/configurazione OS (Linux: mount, Windows: Disk Management)
Zcw001 👍 3 Selected: C
Since the disk in question is a data disk and not the OS disk, you can detach it without needing to stop the VM (option C). If it were the OS disk, you would need to stop the VM first (option A) to safely detach and reattach it. Detaching a data disk can be done while the VM is running, minimizing downtime and ensuring a smoother transition.
👍 1 Selected: C
Makes perfect sense that also lab does allows you to detach the disk while VM is running.
ipv6fan 👍 1 Selected: C
The key term is data disk. You can detach a data disk, but can't detach an OS disk while running
NicoVick 👍 1 Selected: C
c is good answer
Kirby87 👍 1 Selected: A
ere's the correct sequence: ✅ Stop (deallocate) the VM the data disk is currently attached to (Option A). ✅ Then, detach the disk (Option C). ✅ Attach the disk to the other VM. ✅ Start the VMs as needed. So while Option C is a required step, it can't be the first step — you have to stop the VM first.
andted98 👍 1 Selected: C
The question didn't specify whether the data disk is used for OS so since it can be an external attachable data disk, it can be detached without the need to shutdown the VM.
azuredbaadmin 👍 1 Selected: A
To ensure that the virtual machines are offline for the least amount of time possible, the first action you should take is to stop the VM that includes the data disk. This will allow you to safely detach the data disk and then attach it to the other Azure VM. Here are the steps you should follow: Stop the VM that includes the data disk: This ensures that the data disk can be safely detached without any data corruption. Detach the data disk: Once the VM is stopped, you can detach the data disk from the VM. Attach the data disk to the other VM: After detaching, you can attach the data disk to the target VM. Start both VMs: Finally, start both VMs to bring them back online.
AnilParadhe 👍 2 Selected: A
A. Stop the VM that includes the data disk. Azure does not allow detaching a data disk from a running VM. You must first stop the VM to detach the disk safely.
RajeshwaranM 👍 4 Selected: C
C is the correct option. I tried to detach the data disk from VM1 to VM2 without shutting down either of them. The only thing you need to consider is that while you detach the data disk, you need to ensure that the data disk is not being used by any service or operation.
Jig77 👍 1
De-attach the data disk from the current VM: To attach a data disk from one Azure VM to another, you must first detach the disk from the current VM. The disk must not be in use by the original VM when it is being attached to a different VM. This process can be done without shutting down the VM itself, minimizing downtime.
LaReis 👍 1
Segundo o Copilot: Você Você tem uma máquina virtual (VM) do Azure que tem um único disco de dados. Você foi encarregado de anexar esse disco de dados a outra VM do Azure. Você precisa ter certeza de que sua estratégia permite que as máquinas virtuais fiquem offline pelo menor tempo possível. Qual das seguintes é a ação que você deve tomar PRIMEIRO? A. Pare a VM que inclui o disco de dados. B. Pare a VM à qual o disco de dados deve ser conectado. C. Retire o disco de dados. D. Exclua a VM que inclui o disco de dados. Copilot A. Pare a VM que inclui o disco de dados. Primeiro, pare a VM que atualmente possui o disco de dados para desconectá-lo com segurança. Isso minimizará o tempo de inatividade das VMs.
asuarez 👍 1 Selected: A
To ensure the virtual machines are offline for the least amount of time possible, the first action you should take is to stop the VM that includes the data disk (Option A). This step is necessary to safely detach the data disk without risking data corruption1.
Kalaiarasu 👍 1
Answer is A since the strategy allows for the virtual machines to be offline for the least amount of time possible
kejo2 👍 1
Just tested this in my lab. C is the correct answer: you will need to detach the disk before you can add it to another vm
Davidsv 👍 4 Selected: C
I made a experiment: 2 VMs in one region in 2 zones (zone 1 and zone 2). And i can say thats you dont need to turn off virtual machine at all! Create a disk in 1 VM, attach. Now you can see that you can attach Disk on VM when its on. Deattach and you gonna see thats you dont need to turn off VM to do it. Make snapshot of disk, after that do a new disk that gonna take data from snapshot and make it in 2 zone (or in zone 1 if you deattach from VM in zone 2). After creating go to VM2 disk and attach a new disk. You can do it without turning off VM2. And thats a miracle! Disk2 has been attached! So answer C is complitely correct. If you don`t trust my try it by yourself and you will see
Sholasleek 👍 1
It also says which action should you take first? FUnAJ is correct, stopping the VM to avoid disk errors.
ty064 👍 3
It says least amount of time possible, it doesn't say least amount of time ever. So least amount of time with best results
TheFivePips 👍 4 Selected: C
I dont like this question. It is possible to hot swap the disk, but it is not a best practice. Best answer is still C
Mixxy1010 👍 1
if its not the Primary disk you should be able to detach the disk without stopping the VM - Voting C
exampaul1 👍 7 Selected: C
This exact question is on the Microsoft practice assessment for the AZ-104 exam and it states to detach the disk
ELearn 👍 2 Selected: C
according to this official Microsoft Link: The answer is most probably C You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. In the left menu, select Virtual Machines. Select the virtual machine that has the data disk you want to detach. Under Settings, select Disks. In the Disks pane, to the far right of the data disk that you would like to detach, select the detach button to detach. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk isn't deleted.
amurp35 👍 3 Selected: C
See the MS documentation, C is correct.
tsummey 👍 4 Selected: C
n Azure, every virtual machine (VM) has at least two types of disks: an operating system (OS) disk and one or more data disks. The OS disk is essential for booting the VM, while data disks are used for applications and data storage. When the question refers to a VM with a “single data disk,” it implies that there is one data disk in addition to the OS disk. Therefore, detaching the single data disk does not affect the VM’s ability to run because the OS disk remains attached, allowing the VM to operate normally. The data disk can be detached while the VM is running
hemant_ahire 👍 1
Answer is A since you need to make sure writing is not progress to data disk https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
iqqbal 👍 1 Selected: A
As the questions says which of the following is the action you should take first, so the correct answer is A, because before detaching we have to stop the source VM.
samkhtb 👍 1
Correct Answer : A. Stop the VM that includes the data disk. As stated in the question, this is the only disk the VM has, meaning it is the one include the OS. no meaning keeping the VM on when detaching the OS disk from it.
chucklu 👍 1
we have two disk types here, os disk and data disk. when mentioned data disk, it means it's not os disk
LucasTheTrickster 👍 2 Selected: A
The answer is in the first sentence "You have an Azure virtual machine (VM) that has a SINGLE DATA DISK."you can't detach it while is running the OS Because you risk a data corruption.
chucklu 👍 2
data disk is not os disk https://learn.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks
IHAVEMYDOUBT 👍 2 Selected: C
I think there's no need to stop the VM which we detach the disk from, except if it's an OS Disk
Chris17 👍 2 Selected: C
C is correct, if the disk is not an OS disk you can just Detach it.
Morgan91 👍 1
D is correct https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk#detach-a-data-disk-using-the-portal
3c5adce 👍 1
The best answer on an AZ-104 test would be: C. Detach the data disk. Explanation: According to Microsoft documentation, you can detach a data disk from a running virtual machine. This allows you to minimize downtime since the VM does not need to be stopped to detach the disk. Detaching the disk first ensures you can then attach it to another VM without unnecessary downtime.
3c5adce 👍 2
Choosing A (Stop the VM that includes the data disk) first is necessary because you need to ensure the VM is not using the disk when you detach it. Detaching the disk while it's still potentially in use (option C) could lead to data corruption or loss. Stopping the VM first ensures that the disk is not being written to or read from, making it safe to detach and move to another VM.
3c5adce 👍 1
C. Detach the data disk. This action ensures that the disk is no longer in use by the first VM and is ready to be attached to another VM. This approach minimizes the downtime for both VMs as they need not be stopped unless specifically required by the configuration or the type of the disk.
wfsmnt 👍 1
A resposta correta é "C". Não é necessário desligar a VM para desanexar o disco de dados da VM atual, basta remover e anexar na nova.
Cfernandes 👍 1
The correct option is "A". For the exercise informs "...strategy allows for the virtual machines to be OFFLINE for the least amount of time possible."
6f80f6c 👍 3 Selected: C
Detach the data disk. Answer should be C.
neshan 👍 1
To minimize downtime, the first action you should take is to detach the data disk from the original VM. This allows you to prepare the disk for attachment to the target VM without affecting the running state of either VM. Once detached, you can then attach the data disk to the new VM, ensuring minimal disruption to services. The other options (stopping the VMs or deleting the VM) would cause more downtime and are not the optimal initial step.
MCLC2021 👍 1
CORRECT ANSWER C (Detach the data disk) You can detach a data disk from a VM when you want to attach it to a different VM, or when it's no longer needed. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-manage-data-disk
Azlank24 👍 2
To minimize downtime when attaching a data disk from one Azure virtual machine (VM) to another, you should follow these steps: C. Detach the data disk. Explanation: Detaching the data disk from the source VM first allows you to remove the disk without affecting the operation of the source VM. This action can be performed without stopping or deleting the VM, minimizing downtime. Once the data disk is detached from the source VM, you can then attach it to the destination VM. This process typically involves stopping the destination VM briefly to attach the disk, but since the disk has already been detached from the source VM, downtime is minimized. Options A, B, and D involve stopping or deleting VMs, which may not be necessary and can result in additional downtime. Therefore, detaching the data disk (option C) is the most appropriate first action to take in this scenario.
jpdebreuyn 👍 1
C is the correct answer
Amir1909 👍 1
C is correct
Govardhan_7882 👍 2
In the question they mention "You need to make sure that your strategy allows for the virtual machines to be offline for the least amount of time possible" . in that case Answer is A.
_gio_ 👍 3 Selected: C
You can hot detach
JW36 👍 3
SO WHAT is the answer on the TEST ?? What you say or what this test site says ?????
Eze2two 👍 2
you don't need to stop the VM to detach the disk, done in the lab
shaaoteiman 👍 3 Selected: C
Wrong. You can simply detach a data disk from one VM and attach it to the other VM without stopping either of the VMs.
DBFront 👍 1
C is correct answer
mihir25 👍 2 Selected: C
I've done lab it's correct answer is C
mihir25 👍 2 Selected: C
If the desired new VM size is supported on the current hardware cluster hosting the VM, then the resize operation is a simple reboot operation. However, if the current hardware hosting your VM does not support the requested new VM size then the operation of resizing the VM is a bit more difficult. Resizing a VM which requires the VM to be moved to different hardware clusters is different depending on which deployment model was used to deploy the VM. Additionally, the same hardware cluster must be used to host all VMs in a cloud service (for classic deployment model) or all VMs in an availability set (for Azure Resource Manager deployment model). This means in some cases multiple VMs must be resized together. If the Resource Manager (ARM) deployment model was used then the VM(s) can be resized if the VM, and any other VMs in the same availability set, are in a stopped (deallocated) state. If a VM was deployed using the Classic (ASM) deployment model, then the cloud service deployment must be removed and redeployed to change the VMs to a size in another size family.
ejbfa1 👍 1
Confirmed. Correct answer is Detach data disk. https://learn.microsoft.com/en-us/credentials/certifications/exams/az-104/practice/assessment
18c2076 👍 1
You. Are. Wrong. Sit.
Yuraq 👍 1
If you want to use the existing data on the disk again, you can reattach it to the same virtual machine, or another one. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
JW3633 👍 1
So It's Asking for the FIRST step, so (by group census) the first step is to stop the disc, then detach it ? So A is right but B is the logical next step ? Or am I not seeing it right ? (New to this all)
TedM2 👍 3 Selected: C
The Windows OS supports detaching/attaching a virtual disk (VHD or VMware) with the OS running, and without rebooting. Azure supports this as well so the answer is C - Detach the disk from the server that it is currently attached to. Of course this applies only to data disks, not OS/boot disks!
edutchieuk 👍 1
Detach a data disk using the portal You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. In the left menu, select Virtual Machines. Select the virtual machine that has the data disk you want to detach. Under Settings, select Disks. In the Disks pane, to the far right of the data disk that you would like to detach, select the detach button to detach. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk isn't deleted.disk isn't deleted.
conqueror11 👍 1
for it's A as there's a key word "offline" which means the VM should be shutdown before detaching the disk. It could be the answer is C if the condition is "Availability" of VM without shutting down.
23ce930 👍 1
You are betting on the vm not having anything written on the disk. If you detach and disk gets corrupted then you need to spend more time backing it up.
tritonb7 👍 1
Shutting down the VM first would ensure that nothing is being written to the data disk.
yashsj 👍 2 Selected: C
As per question it says least amount of downtime so answer is C, if it would have asked for steps to ensure the data consistency, ideal approach would have been stop the services/applications which are bound to use data disk, stopping a VM still would not have been an ideal approach.
fiahbone 👍 3 Selected: C
I'd say that reassuring that nothing is using the data disk and then detach the data disk would cause less (zero) downtime than stopping the VM first.
Megabyte10 👍 1
Reading this.. it refers to "OS and data disks for your VM's" - as in.. data would be a secondary VM. So Detaching.. seems like the right answer.
Sthakathi8 👍 2
C; Here are the steps on how to detach a data disk from an Azure VM using the Azure portal: Go to the Azure portal and sign in to your account. Click on the Virtual machines blade. Select the VM that has the data disk you want to detach. Click on the Disks tab. Select the data disk that you want to detach. Click on the Detach button.
Aderichie1 👍 2
C is correct
shrsrm95 👍 1 Selected: A
i assumed it was A, since stopping the VM would be the best way to ensure that the data disk doesn't risk getting corrupted (if it's being written to). however, would it not be possible to somehow "unmount" the data disk from the old VM before attaching it to the new VM as such that it doesn't actually require stoppage of either VM?
Chirru1024 👍 2
"You need to make sure that your strategy allows for the virtual machines to be offline for the least amount of time possible." They are expecting us to make the VMs offline. So we need to make strategy to make offline both the VMs or the only VM which is really required to turn off. Option A is best practice as per industry standards.
Msug 👍 2
I understand that C is the logical answer because it's not necessary to stop the VM first. However, is A the expected answer when taking the exam??
oopspruu 👍 4 Selected: C
C is correct as we can simply detach a data disk, and then reattach it to a new or same VM. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk The question doesn't say if there's any active data transfer on it or not so C is the right approach.
JWS80 👍 3 Selected: C
c: is correct You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
VV11_SS22 👍 2
C is correct
BrainDumper85 👍 3 Selected: C
C IS CORRECT! A VM in Azure has always its own OS disk! "A single data disk" means, that it is using an additional disk configured to store data, so it has 2 disks and it won't cause any problem to detach the data disk. Look documentation: https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview
blackmetalx 👍 1
You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
odcyul27h 👍 3 Selected: C
You can simply detach a data disk from one VM and attach it to another
tototo12 👍 4 Selected: C
you can detach it as it is a data disk not os
JS_Jasey 👍 5
The correct solution to minimize downtime while attaching the data disk to another Azure VM is: A. Stop the VM that includes the data disk. Explanation: Stopping the VM that includes the data disk will ensure that there are no active read/write operations on the disk while detaching it. Once the VM is stopped, you can safely detach the data disk from the VM. After detaching the data disk, you can then attach it to the target Azure VM. Finally, you can start both VMs (the one you detached the data disk from and the one you attached it to) to resume normal operations. By stopping the VM that includes the data disk first, you ensure that no data corruption or inconsistency occurs during the disk detachment process, and it allows for a smooth transition with minimal downtime for both VMs involved in the operation.
BrightJames 👍 3
Suppose any date transfer or backup is happening on the data disk, then the files may get corrupt .. right ? Stopping the vm and detach will be the right way of doing ? Correct me if I am wrong
TamerX 👍 2 Selected: C
You can use hot removal, (no need to stop the VM)
👍 1
Hot removal of data disks is allowed. Tested in lab and is referenced in the Microsoft documentation here https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk. The trick is not to remove it while it's in use to avoid corruption. Answer is C
Muntazirsyed 👍 3
I performed this in LAB. Detach a data disk from one VM and attach it to the other VM without stopping the VMs.
pspatil1981 👍 1
Answer will be A as there is only one data disk on which OS resides.
Sumo_88 👍 2
That is OS disk not data disk
ThorNik 👍 1
https://learn.microsoft.com/en-us/azure/devtest-labs/devtest-lab-attach-detach-data-disk
aryadevcse 👍 1
C looks correct to me
hunkk 👍 1
I used the RARD in chrome web. Q1) What is a virtual machine that has only single data disk? A1) A virtual machine with only a single data disk is a virtual machine that has one disk attached to it. This disk is used to store the operating system and all of the data for the virtual machine. Q2) I have a virtual machine that has only single data disk and want to attach with another virtual machine, How is the sequence? A2) 1. Shut down the virtual machine that has the single data disk. 2. Detach the single data disk from the virtual machine. 3. Attach the single data disk to the other virtual machine. 4. Start the virtual machine that has the single data disk attached.
TonySuccess 👍 2 Selected: C
The Answer is C
NVAV 👍 1
The question is which is the first step to take, please guide me if its stop vm or detach a data disk?
codename0007 👍 1
The Answer is B, "You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM." Reference: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Andre369 👍 1 Selected: B
B. Stop the VM that the data disk must be attached to. By stopping the target VM where you want to attach the data disk, you can avoid any potential conflicts or issues that may arise during the disk attachment process. Stopping the VM ensures that the VM is not actively using the resources or the disk, allowing for a smooth and uninterrupted attachment. Taking the other actions mentioned would result in unnecessary downtime or potential data loss: Stopping the VM that includes the data disk (option A) is not the first action to take as it doesn't directly address the goal of attaching the data disk to another VM. Detaching the data disk (option C) can lead to data loss if not done properly and doesn't address the requirement of attaching the disk to another VM. Deleting the VM that includes the data disk (option D) would result in permanent data loss and is not a suitable action for achieving the goal of attaching the data disk to another VM.
Slimus 👍 3 Selected: A
The key words are "VM that has a single data disk" meaning it's also contains logical OS disk. You wont be able to detach a single data disk from a VM, you need to shutdown the VM as the first step.
LokiD 👍 1
When you create a VM in Azure, the OS disk is automatically created and attached to the VM. It is separate from any additional data disks that you may attach to the VM for storing data
Steve0705 👍 3 Selected: C
C, detach the data disk, is correct. A, Stop the VM, is wrong. That is not necessary for data disks, only for OS disks.
Abiram 👍 1
Tried this Practically: Go to VM1 -> Disks -> Data Disk -> On the right corner of the data disks – select Detach (X) Go to VM2 -> Disks -> Data Disk -> Attach an existing disk the data disk should now be available on VM2. No outage to either of the VMs.
sasa33_p 👍 3 Selected: C
The correct answer is C. Detach the data disk.
Andre369 👍 1 Selected: A
Answer A
BowSec 👍 3 Selected: A
Have to pay attention to the context of the question as it states "make sure that your strategy allows for the virtual machines to be offline" so A would be the correct FIRST step!
KrisJin 👍 2
Answer C does not even need any offline time...
habbey 👍 2
It is recommended that you stop a VM before detaching a data disk, as detaching a data disk while the VM is running can cause data corruption and loss. When a data disk is attached to a running VM, the operating system of the VM has open handles to the data on the disk. If you detach the data disk while the VM is running, these open handles can cause data corruption or loss. By stopping the VM before detaching the data disk, you ensure that all open handles to the disk are closed, and that the data is safely flushed to the disk before it is detached. This helps prevent data loss and corruption. Therefore, it is highly recommended that you stop the VM before detaching a data disk. - CHATGPT
Madbo 👍 3
The correct answer is C. Detach the data disk. Before attaching the data disk to another VM, it needs to be detached from the original VM. This can be done while the original VM is running, so there is no need to stop either VM. Once the data disk is detached, it can be attached to the target VM without any downtime for either VM.
maxsteele 👍 2
but the objective to reduce downtime as much as possible. So the real FIRST step would be to ensure nothing is actively using the disk. However that is not an option so we must go with the most correct option, which would be to Detach The Disk, as that prevents downtime.
doodleman 👍 4 Selected: C
Reference that is given in the solution even says that you detatch from a running machine: https://learn.microsoft.com/en-us/azure/devtest-labs/devtest-lab-attach-detach-data-disk#detach-a-data-disk
GohanF2 👍 2
C is correct, u dont need to stop the VM to deattach the disk
JunetGoyal 👍 4
You can detach without stop vm , just make sure no active operation on disk, goto last section on doc!! https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk,
Alex1998 👍 4 Selected: C
You can do this without stopping the firs Vm
Akshita 👍 4 Selected: C
Disks can be detached and attached whilst VM is running.
maqibali 👍 2 Selected: C
It is not required for the target machine to stop in order to attach a data disk that was detached from another VM. The data disk can be attached to the target VM while it is running, as long as it meets the following requirements: The target VM must be in the same region as the data disk. The target VM must be in the same resource group as the data disk. The target VM must be in the same subscription as the data disk. Attaching a data disk to a running VM may require some additional configuration within the guest operating system of the target VM, such as formatting the disk and assigning a drive letter. However, this process can typically be done without downtime for the target VM.
hikaruti 👍 1
C is correct
je_it 👍 1
C. Detach the data disk. Before you can attach a data disk from one Azure VM to another, you need to detach the data disk from the original VM. Detaching a data disk does not require the VM to be stopped, so this action can be performed without any downtime to the workload running on the VM.
Leunis 👍 2 Selected: C
Disks can be hot detached.
kklohit 👍 3 Selected: C
Option C, Detach the data disk, would be the correct first action to take. Before you can attach a data disk to another VM, you need to first detach it from the original VM. Detaching the disk does not require the VM to be stopped, which means that the downtime for the VM is minimized. Once the disk is detached, you can then attach it to the other VM.
Benzitho 👍 9
"You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM." Copied from your LINK ....
nilesh_1 👍 2 Selected: C
Detached data disk and attached to other VM.
starksolutions 👍 1
C is correct
84rulees 👍 2
According to Microsoft: You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. 1. In the left menu, select Virtual Machines. 2. Select the virtual machine that has the data disk you want to detach. 3. Under Settings, select Disks. 4. In the Disks pane, to the far right of the data disk that you would like to detach, select the X button to detach. 5. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk isn't deleted.
AnonFox 👍 4 Selected: C
Microsoft wants the answer based on "least amount of time required" "You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM." No need to shut it down, even though in production you probably would.
abiurrunc 👍 1
Turn off the virtual machine; this step is mandatory.
CaptHarlock 👍 4 Selected: A
A is correct!! The vm have a single disk!! That means is using same disk either OS and data. So you can't detached disk without shutting down vm.
CommanderBigMac 👍 2
The VM has a single Data disk, but the data disk is not the OS disk they are different. So you can simply detach the data disk and attach it to a new machine without impacting the first VM.
orionduo 👍 2 Selected: C
C is correct
Rufusinski 👍 2 Selected: C
C is correct.
Mugamed 👍 3 Selected: C
It says you can hot remove a disk here
suresh0512 👍 1
The question asked here is whether we can detach the disk or not for that the answer is YES, but when the disk is being used simply detaching the data loss especially when you have it partitioned and is being actively used and you get an IO Error..For better results it's always wise to stop the VM and detach it... Also, Azure doesn't support downing the Disk size to prevent Data Loss
ElDakhli 👍 2 Selected: C
No Need to stop the machine before detaching the data disk. However, operationally, I think we have to make sure that no process is writing to the disk and then umount the disk and then detach it.
darthfodio 👍 2 Selected: C
One may just detach the disk without shutting down any VMs. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
mabdullah 👍 2 Selected: C
C is correct
JCstudent 👍 2 Selected: C
Wrong. You can simply detach a data disk from one VM and attach it to the other VM without stopping either of the VMs.
Sachinlanghe 👍 2 Selected: C
Correct option is C
edutchieuk 👍 5 Selected: C
Not the best practice but the question is for the strategy to allow for the VM to be offline for the least amount of time possible. Stopping the VM = downtime whereby detaching the DATA disk only = no downtime. So anser C is the correct answer.
BYNeo 👍 2
This question is asking "You have been tasked with attaching this data disk to another Azure VM" why become detach data disk in here?
UNIQUE_ULTERIOR 👍 1
The Question is asked what you should do FIRST !
francescoc 👍 4 Selected: C
When you no longer need a data disk that's attached to a virtual machine, you can easily detach it. This removes the disk from the virtual machine, but doesn't remove it from storage. When you detach the disk, make sure nothing is actively using the disk before detaching it from the VM. You can detach a disk using PowerShell. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
simonseztech 👍 4 Selected: C
No need to stop either VMs
TechModric 👍 2
in this particular context we have to pay attention to the hint given to us "You need to make sure that your strategy allows for the virtual machines to be offline for the least amount of time possible.", so A is also an option. B is correct but for this one i still stand with A
TechModric 👍 1
I STAND TO BE CORRECTED THOUGH
bdumois 👍 1
I think the answer is C. Microsoft site also says: "You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM." https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
mk_km 👍 4 Selected: C
Detach a data disk using the portal You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. In the left menu, select Virtual Machines. Select the virtual machine that has the data disk you want to detach. Under Settings, select Disks. In the Disks pane, to the far right of the data disk that you would like to detach, select the X button to detach. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk isn't deleted.
Hebamursi 👍 1
The question says : "allows for the virtual machines to be offline for the least amount of time possible" which gives an impression that one of the machines will go off. I saw comments that says power off the VM to not interrupt data, I guess that's the admin job to disconnect the disk on computer management before detaching it if it's not read-only. I would go with "C" as I tested detaching the disk and attaching to another VM and it works while both are live.
Ntinsky 👍 2 Selected: C
C is correct.Tested on 2 VMs in the same resource group and a disk attaching and detaching between them.
luis_arnette4 👍 2
C is correct. you can detach a disk, without having to stop the MVs
NaoVaz 👍 2 Selected: C
I believe that C) " Detach the data disk." is the correct option. If down-time is something that we should minimize, and seeing that we are talking about a Data disk, one canjust detach de disk and attach it to other VMs without ever shutting down any VM.
Simpemba 👍 1
Question includes "that your strategy allows for the virtual machines to be offline for the least amount of time" hence stop the VM.
josephshy 👍 4 Selected: A
While a 'hot-detach' is possible, I would say its not preferable. The exam wording should probably align w the docs to prevent confusion. Do you want a smooth landing or wild ejector-seat ride? In a live environment, or specifically any organization's environment at scale, availability and data acuity are both important. Most often there is some internal process around this type of work and its content would err toward 'better safe than sorry' point of views.
Lidia30 👍 1
Correct option is C You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. In the left menu, select Virtual Machines. Select the virtual machine that has the data disk you want to detach. Under Settings, select Disks. In the Disks pane, to the far right of the data disk that you would like to detach, select the X button to detach. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk isn't deleted. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
EmnCours 👍 2 Selected: C
C is correct you can simply detach and attach a data disk
FunAJ 👍 27 Selected: A
Stop the VM first so that disk data is not corrupted (if an service is writing data while you detach)
uwhm2b5fz 👍 5
detaching the disk is the correct option to satisfy the requirement of least amount of time possible. You can verify no disk activity before doing so so stopping the VM is not the correct answer.
areyoushawtho 👍 2
"allows for the virtual machines to be offline for the least amount of time possible." Detaching means no offline time, weather its better to or now
karrey 👍 1
Makes sense but not needed according to MSF
skydivex 👍 16
Wrong... disk can be hot detached with powershell or through portal. the command ensures no operation is accessing the disk when detaching it. here is the link to micrsoft article: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
klasbeatz 👍 14
This makes the most sense but apparently stopping the VM isn't needed according to Microsoft documentation
Anup_darade 👍 1
I tested in my lap ,correct answer should be C
fjvela 👍 3 Selected: C
C is correct.
Jayad 👍 1
As per this article, you can simply detach and attach a data disk: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
enzofjh 👍 3
guys, it is saying just with SINGLE DISK and you need to detach it. Single disk has OS and programs, so would you go just detaching it like that? Also, I think it is not allowed for primary disk (single). If it is a secondary, then it will make sense
mo95 👍 4
It's 'single data disk' in the question not SINGLE DISK
namnh68 👍 3 Selected: C
C is correct
Simpemba 👍 1
Answer is A. The question hasnt specified if the Disk is being completely removed from the current VM hence the first assumption it will still also be used by the current VM. https://docs.microsoft.com/en-us/azure/virtual-machines/disks-shared
Subham9861 👍 1
Vote C No need to stop the VMs.
stealthster 👍 3 Selected: C
Think C as well, it states that their is a single data disk, that does not mean their is not another disk for the O/S. You can hot remove the disk from a running VM and this would have the least amount of offline time, literally none. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
enodeb 👍 2
C is correct. No need to stop any VM.
klexams 👍 4 Selected: C
Detaching then attaching to another vm would take the least amount of offline
CTino 👍 4 Selected: C
The correct answer should be C. You can "hot detach" a datadisk these days. See https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
cloudera 👍 4 Selected: C
Should be C. To answer this question, we need to understand what is Data Disk and OS Disk as explained here
DenZol 👍 2
Right answer A, because it sad that VM has only 1 disk so that mean that this disk its OS disk and you cannot detach disk on working VM
watermeloner 👍 1
its single data disk ,not single disk
vadi123 👍 3
They have clearly mentioned Data disk so we can just Detach and attach it to desired VM without restarting either
nowbiteme 👍 1
I find this site hysterical where they actual post a link with the answer and its STILL WRONG
Leti 👍 5 Selected: C
C is correct https://docs.microsoft.com/es-es/azure/virtual-machines/windows/detach-disk
Vijayv 👍 3
Here given answer is "Correct". As key word is "(VM) has a single data disk" means VM has only one disk which contains OS as well, So this require stop VM then detach and attach to any other
PhilLI 👍 2 Selected: A
Agree with Mozbius_ no place for cowboys. And on top of that: for Linux machines MS mentions to log on to the server first and unmount it: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/detach-disk (not all servers are Windows)
GiJoe1987 👍 1 Selected: A
Im guessing you should stop the VM so you dont get any corrupted DATA - this is the only reason I would not just detach the disk
ckanoz 👍 1 Selected: D
Correct answer is D. A data disk is not an OS disk. You don't need to stop a VM to remove a Data disk
PhilLI 👍 2
Good logical thinking. I assume we are not stimulated by Microsoft to act like cowboys (of which I've seen too many in the last 25 years) So answer A seems the best. And on top of that: for Linux machines MS mentions to log on to the server first and unmount it: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/detach-disk (not all servers are Windows)
AzureLearner76 👍 4 Selected: C
You can hot detach a disk and it will remain in the premium storage
theorut 👍 4
VM has a single disk (so this will be an OS disk) and therefore VM needs to be stopped first. No detach available for OS disk.
pawel_ski 👍 2
No. It is written "data disk" no "a disk". There is a distinction between a OS disk and a Data disk.
Pasmo 👍 2
Detach the data disk
raoeh 👍 2
tested in my machine answer c
nqthien041292 👍 3 Selected: C
Vote C
wondinv 👍 1
Just tested in lab. You don't need to turn the VMs off. Just detach the disk and attach it to the secondary VM.
atilla 👍 1
second links says no need to stop a VM
Mozbius_ 👍 1
I agree but stopping the app is not a potential answer here. So question then remains whole : "Which of the following is the action you should take FIRST?". Would you FIRST detach the disk (C) or prevent data corruption (AKA making sure nothing is actively using the disk) by stopping the VM that uses the disk (A) and then proceed with (C)? [You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM.] https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Salu007 👍 2 Selected: C
Answer is C
Mozbius_ 👍 2
I think the answer is A. Disks can be HOT removed yes, but before doing so you should prevent the disk from being used while doing so to avoid data corruption and based on available answers A addresses that. Also the question implies that a minimum of downtime is ok. And from a logical point of view who in their right mind would HOT disconnect a disk without making sure that nothing is running on the disk?!?
AbleApe 👍 2
A does address the data corruption but you can also just stop an app from running on the VM to prevent use of the disk. You will still have app downtime but perhaps not VM downtime. IMO that's faster and safer than just shutting down the VM depending on how the app is written.
LiMburu 👍 1
The best practice should always assuming there are services writing to the disk, so always stop it first before detaching.
vihanga93 👍 2 Selected: C
correct answer is C
graige2 👍 4 Selected: C
Ans : C You can detach a data disk from running VM, no need stop the VM
AltHexMax 👍 3
I'm confused...because @CellCS has a good point reflected here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk#detach-a-data-disk-using-powershell --> "You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM." Ok you can detach and attach without taking VM off but question says: "You need to make sure that your strategy ALLOWS for the virtual machines to be offline for the least amount of time possible." And if the VM has an App actively using the data disk... data can get corrupt... It's not just about how technically possible it is, but how we as administrators must manage infrastructure effectively... right?
PhilLI 👍 1
Correct, we must take all information into account. See my answer above.
CellCS 👍 1
A answer is right. The VM has only one data disk. to detach this disk, need to make sure nothing is actively using the disk before detaching it from the VM (https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk).
AltHexMax 👍 1
Sounds fair... as the question tells you can take the machines offline but for the minimum amount of time... As the actual VM can be reading/writing to data disk it could represent a risk to detach it with the VM up... but I'm still confused.
Hunk_cn 👍 3
only one disk, So I think we should stop the VM server
AltHexMax 👍 2
Data disk != OS Disk
ninjia 👍 2 Selected: C
I think the correct answer is C. You can detach a data disk without stopping the VM. Tested in Azure as below: Preparation 1. Create a Windows VM with OS disk and one data disk. 2. Make sure the VM is running. Detach 1. Select the virtual machine that has the data disk you want to detach. 2. Under Settings, select Disks. 3. In the Disks pane, to the far right of the data disk that you would like to detach, select the X button to detach. 4. Select Save on the top of the page to save your changes. Now the disk has been detached from the VM.
routeswitch 👍 2 Selected: C
There is no need to stop the VM
Vkom 👍 3 Selected: C
Data disk (Secondary disk) can be easily detached and then attached to any other VM without rebooting either of the VMs. The fastest and least disruptive way is to detach the disk
ABhi101 👍 1
C option is the right one
JM76 👍 2 Selected: C
Done it before
ant_man 👍 2 Selected: C
C: detach the disk
merlot78 👍 2 Selected: C
Should be c
Redimido 👍 2
Based on: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk "You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM."
szymonusz 👍 2 Selected: C
Even the supporting evidence in the answer suggests the VMs dont need to be stopped
Rach2b3n 👍 2 Selected: C
the correct answer is C:
Prano 👍 1
Ans : C You can detach a data disk from running VM
Diwakar_Reddy 👍 2 Selected: C
Correct answer is C
YashL 👍 1
OS Disk and Data disk both are different, so Answer C is correct, you can detach data disk without VM offline.
DMouser 👍 2 Selected: C
Stopping is unnecessary - so why even take the VM offline in the first place. Detaching the disk from the source VM is enough.
LUISCA2021 👍 2
The VM has a single data disk, the single data disk is operative system, I cant dettach operative system disc when I have running the VM, for my is A stop the vm.
Iringahn 👍 1
No when you spin up an azure virtual machine an OS disk is considered separate from a data disk I believe?
yemkyen 👍 2 Selected: C
c is correct
y_dev 👍 4 Selected: C
No need to stop VMs for de-attach or attach data disk.
Osmoziz 👍 1
c is correct https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Takloy 👍 2
Hi Admin... please update the right answer.
Chinsen 👍 3 Selected: C
C is right answer
hmzansari 👍 3 Selected: C
The correct answer is C
rockhound 👍 4 Selected: C
You can detach and attach a disk on a running VM.
J511 👍 1
Correct answer is C - Detach from the VM's management page --> Select your running virtual machine with an attached data disk. From the virtual machine page, under Settings, select Disks. Under Data disks, select the data disk you want to detach. Source: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
MrAzureGuru 👍 1
Correct answer is A - whilst you can detach a data drive from a running VM, it will take some TIME to do so. it is quicker to stop the VM and detach.
MrAzureGuru 👍 1
PS. I have labbed this as the time to detach is variable - plus I made the mistake and did not read the bit about the VM is to have minimal time offline. Correct answer is to detach the disk from the live VM.
yooi 👍 3
Correct answer is C: You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. In the left menu, select Virtual Machines. Select the virtual machine that has the data disk you want to detach. Under Settings, select Disks. In the Disks pane, to the far right of the data disk that you would like to detach, select the X button to detach. Select Save on the top of the page to save your changes. The disk stays in storage but is no longer attached to a virtual machine. The disk is not deleted. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
anoopjoseph 👍 2
Detach the data disk (IS THE CORRECT ANSWER)
Bere 👍 2
As described here: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk#detach-a-data-disk-using-the-portal You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. So answer is C.
bcristella 👍 1
The correct answer is C. When you no longer need a data disk that's attached to a virtual machine, you can easily detach it. This removes the disk from the virtual machine, but doesn't remove it from storage. If you want to use the existing data on the disk again, you can reattach it to the same virtual machine, or another one. You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Eltooth 👍 1
C - correct answer.
SM22 👍 1
option c is the right answer i feel
theOldOne 👍 1
Thanks for your folowup/input on this.
luxaflow 👍 1
Answer is C: You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. See: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
theOldOne 👍 3
Seems like there is some confusion on what "a single data disk" is in this question. As an engineer I read that to mean the VM only has one disk as I consider the OS to also be data. In this case I see it as a single data disk that is being used by the operating system, thus the reference to it being offline for as short a time as possible. I can also see valid reason for someone to interpret it as it representing a disk that contains only data, which would be an entirely different answer. For questions like this how do we know what they are looking for on the test?
KFM2020 👍 7
Microsoft make a distinction between an OS disk and a data disk throughout their documentation and the portal. You will see this when you a view the disks blade for a VM. The top will show the attached OS disk and the bottom will show the data disks attached (if any). The offline reference is simply a trick or to see if you understand that you don't have to stop (offline) the VM first. Therefore, the answer to this question is C.
GuyForget 👍 1
It specifically says the VM should be offline for the least amount of time as possible. You can detach a data disk from a running VM, so the answer should be C. I understand that best practices say that you should make sure nothing is running on the data disk, but the question specifically states that the VM should be offline for as little time as possible. In a scenario like this, I'd say best practice would be to make sure nothing is running from within the guest OS, then detaching the data disk while the VM continues to run.
silver_bullet666 👍 1
Just throwing this out there, you should offline the disk in windows before detaching it.
asmi3342344 👍 2
you 1st need to stop the VM, you can detach the disk which is connected to the running VM. 1st stop the VM and then detach. The question says what you will do 1st. so 1st you need to stop the VM.
fellware 👍 3
It should be answer C: Detach the Datadisk Lines from docs: Powershell: You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. Portal : You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM.
Micah7 👍 2
Correct answer is C based on the included articles and excerpts here: * You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk • You can only attach a data disk to a VM that is running. Make sure the VM is running before you try to attach a data disk.
Bloodwar 👍 1
Correct answer is C, easy...
annageor 👍 2
A. Though you can hot detach, the VM has single hard disk, so it must be turned off so it is not actively using the disk
Kopy 👍 1
Because also it says "virtual machines to be offline for the least amount of time possible"!
johanc68 👍 2
It's a data disk, not the OS disk, that must be moved so it's safe to remove it from the VM.
rpz00 👍 3
Azure labs for 104 shows detach as correct answer
marcusaurelius124 👍 1
Per YOUR article: "You CAN hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM."
CloudyTech 👍 4
A is correct
neemz 👍 2
I agree, It cannot be A because you can hot detach a data-disk. It cannot be B either because the VM must be running for you to attach a data disk. so would be C
rawrkadia 👍 3
You're wrong: You can hot remove a data disk, but make sure nothing is actively using the disk before detaching it from the VM. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Mbom 👍 1
Why not answer C ?
ppp131176 👍 4
I would say C is correct You can hot remove a data disk https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk
Aresbuddy 👍 2
C is correct. The confusion is between OS Disk and Data Disk. The question is about the single data disk, which should be able to hot detach as long as nothing is using it actively.
Pascal1 👍 1
I think A is correct. from that website they say: "You can hot remove a data disk using PowerShell, but make sure nothing is actively using the disk before detaching it from the VM." So the VM has to be stopped to make sure the disk is not in use
jecawi9630 👍 264
Wrong. You can simply detach a data disk from one VM and attach it to the other VM without stopping either of the VMs.
Sledgehammer 👍 4
C is correct. I work with data disks on regualar bases and it is a blessing that this can be moved over to another VM without having to stop any VM first.
Dankho 👍 2
Right, not wrong!
ServerBrain 👍 5
Correct. surely if you can detach a USB drive from your Windows PC without shutting it down, how is it not possible to do the same on a VM..
algokhan 👍 3
Correct
francescoc 👍 4
Correct
imartinez 👍 13
Right. the correct answer is C: detach the disk is the first action. And Also: You can only attach a data disk to a VM that is running- https://docs.microsoft.com/en-us/azure/devtest-labs/devtest-lab-attach-detach-data-disk
FrostyD 👍 8
Correct, tested in lab
jjnelo 👍 11
Correct. Just tested in lab.
EKTan 👍 35
Correct. Just tested in lab. Didn't have to stop the VM the detach and attach to the other.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option C is the first step because a data disk can be hot-detached from a running Azure VM directly through the portal, CLI, or PowerShell without deallocating the machine. Microsoft's detach-disk documentation confirms you can remove a data disk while the VM is running, provided no application is actively writing to it, and the same disk can then be attached to a second VM. Choosing C first minimizes downtime because neither the source nor the target VM ever needs to be stopped during the transfer.

Why the Other Options Are Wrong

Option A (stop the source VM) adds unnecessary downtime — the community lab tests confirm the detach works without a shutdown, so stopping the VM directly conflicts with the "least amount of time offline" requirement. Option B (stop the target VM) is likewise unnecessary; the target VM only needs to be running to accept the disk attachment, and stopping it would only extend the outage. Option D (delete the source VM) is destructive and irreversible — it would remove the VM and its configuration entirely rather than simply moving the disk.

Community Comment Notes

jecawi9630's comment states plainly: "You can simply detach a data disk from one VM and attach it to the other VM without stopping either of the VMs," and several lab testers (EKTan, jjnelo, FrostyD) confirm they completed the operation with both VMs running. exampaul1 adds that "This exact question is on the Microsoft practice assessment for the AZ-104 exam and it states to detach the disk." The dissenting view from FunAJ ("Stop the VM first so that disk data is not corrupted") reflects a real concern about active writes, but as Benzitho and skydivex note, that is handled by verifying nothing is using the disk rather than by powering off the VM.

Official Reference

Exam Strategy

Remember the distinction between hot and cold operations: data disks support hot attach and hot detach, while OS disks and VM deletion always require a stop. In any "least downtime" question, pick the action that avoids stopping or deallocating a VM.

Frequently Asked Questions

Does the source VM need to be stopped before detaching a data disk?

No. Azure supports hot-detaching a data disk from a running VM as long as no application is actively writing to it, so stopping the VM is unnecessary.

Can a data disk detached from one running VM be attached to another VM?

Yes. Once detached, the disk can be attached to another VM, which should be running to accept the attachment.

More AZ-104 FAQ →

Related Analysis

Practice All AZ-104 Questions

Access 100 questions with complete answers and detailed explanations.

View Full AZ-104 Practice Test →

← Back to AZ-104 Study Guide