Azure Migrate gives a cannot eject virtual DVD error

Chris Davis 45 Reputation points
2025-01-04T08:11:58.15+00:00

Moc-operator cannot eject virtual DVD during migration to Azure local after fail over complete.

Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
851 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Lionel Ong 20 Reputation points
    2025-01-05T23:05:45.7733333+00:00
    1. Ensure the VM is fully powered on and operational after the failover.
    2. Manually eject the virtual DVD from the VM settings in the Azure portal.
    3. Verify the recovery point is complete and valid.
    4. Check that you're using the latest version of the Azure Migrate tools and MOC operator.
    5. Review migration settings to ensure the virtual DVD is not included.
    6. Retry the migration after ejecting or detaching the virtual DVD.
    7. Ensure no processes inside the VM are using the virtual DVD.
    8. Check migration logs for any additional error details.

  2. Jon McCabe 5 Reputation points MVP
    2025-01-07T16:41:51.09+00:00

    Is this a Gen1 or Gen2 Hyper-V VM? And what do you mean "removes migrated VM from the Azure Local cluster"? Are you saying the migration fails completely? Have you looked in both Failover Cluster Manager and Hyper-V Manager? I know there can be issues if the source VM is using the D:\ drive or has an ISO mounted because that is needed for the Arc seed.


  3. Jon McCabe 5 Reputation points MVP
    2025-01-09T14:11:18.96+00:00

    Not sure which workaround you are referring to, but to enable Guest Management on a Gen1 migrated VM you need to follow the steps outlined here:

    Enable guest management for migrated VMs (preview)

    Hope this helps.

    0 comments No comments

  4. Rahul Podila 1,310 Reputation points Microsoft Vendor
    2025-01-10T02:31:50.0333333+00:00

    Hi @Chris Davis

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    In the Azure portal, find your VM and check the settings. Look for the DVD drive and make sure it's not still attached. If it is, go ahead and set it to None or remove it.

    Try turning off the VM, wait a few seconds, and then turn it back on. Sometimes this helps clear up issues after a migration.

    If that doesn’t work, you can use a PowerShell command to remove the DVD drive. Here's an example of the command:

    Get-AzVM -ResourceGroupName <YourResourceGroup> -Name <VMName> | Set-AzVM -RemoveDataDisk <DriveName>
    

    Just replace <YourResourceGroup>, <VMName>, and <DriveName> with your actual details.

    If you moved the VM from an on-premises Hyper-V server, double-check the settings there to make sure the DVD drive was removed before migrating to Azure.

    Finally, if nothing else works, you may need to restart the migration process to make sure the DVD drive isn’t attached during the move.

    If your any concern, please go through this link: -
    https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/azure/manage-vm

    If you have any further queries, do let us know.

    0 comments No comments

  5. Chris Davis 45 Reputation points
    2025-01-13T15:15:45.9566667+00:00

    Thanks for your help. There is no fix at the moment. The workaround is simply to wait until the migration gets this this stage (at which time the migrated VM should pop up in the Azure Local Failover Cluster Manager,) Then simply edit the VM settings in the FCM to eject the DVD. The migration then continues to successful conclusion. Timing is crucial, leave it too long and the migration will clean up, delete the VM and fail! error

    1. Report a concern
    0 comments No comments

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.