AZ-104 Exam QuestionsBrowse all questions from this exam

AZ-104 Exam - Question 17


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?

Show Answer
Correct Answer: C

The appropriate step to take first is to detach the data disk. In Azure, data disks can be detached from a running virtual machine without the need to stop it. This allows for the minimal downtime of virtual machines. Ensuring the data disk is detached first enables it to be attached to another VM without affecting the operation of the currently running VM. It is essential, however, that no processes are actively using the data disk at the time of detachment to avoid data corruption, but this does not necessitate stopping the VM.

Discussion

17 comments
Sign in to comment
jecawi9630Option: C
Jun 30, 2021

Wrong. You can simply detach a data disk from one VM and attach it to the other VM without stopping either of the VMs.

[Removed]
Jul 4, 2021

Exactly

jjnelo
Jul 28, 2021

Correct. Just tested in lab.

FrostyD
Aug 11, 2021

Correct, tested in lab

jackdryan
Feb 23, 2023

C is correct

FunAJOption: A
Apr 17, 2022

Stop the VM first so that disk data is not corrupted (if an service is writing data while you detach)

klasbeatz
Aug 30, 2022

This makes the most sense but apparently stopping the VM isn't needed according to Microsoft documentation

skydivex
Feb 19, 2023

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

Benzitho
Apr 6, 2023

"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 ....

maxsteele
Sep 25, 2023

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.

23ce930
Mar 31, 2024

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.

karrey
Mar 22, 2023

Makes sense but not needed according to MSF

tsummeyOption: C
Jun 17, 2024

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

3c5adceOption: A
May 11, 2024

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.

LucasTheTricksterOption: A
May 28, 2024

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
Jun 4, 2024

data disk is not os disk https://learn.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks

amurp35Option: C
Jun 22, 2024

See the MS documentation, C is correct.

exampaul1Option: C
Jul 12, 2024

This exact question is on the Microsoft practice assessment for the AZ-104 exam and it states to detach the disk

3c5adceOption: C
May 10, 2024

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.

3c5adceOption: C
May 14, 2024

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.

Morgan91Option: D
May 17, 2024

D is correct https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk#detach-a-data-disk-using-the-portal

Chris17Option: C
May 25, 2024

C is correct, if the disk is not an OS disk you can just Detach it.

IHAVEMYDOUBTOption: C
May 25, 2024

I think there's no need to stop the VM which we detach the disk from, except if it's an OS Disk

samkhtbOption: A
May 29, 2024

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
Jun 4, 2024

we have two disk types here, os disk and data disk. when mentioned data disk, it means it's not os disk

iqqbalOption: A
May 31, 2024

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.

hemant_ahireOption: A
Jun 6, 2024

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

mattpaulOption: C
Jun 22, 2024

C is correct, I agree with the Highly Voted Get all questions at <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2959485c450744485d5d414c5e5a18101e1969465c5d45464642074a4644">[email protected]</a>

ELearnOption: C
Jul 8, 2024

according to this official Microsoft Link: The answer is most probably C Detaching a data disk using the portal: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk 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.