- Ensure the VM is fully powered on and operational after the failover.
- Manually eject the virtual DVD from the VM settings in the Azure portal.
- Verify the recovery point is complete and valid.
- Check that you're using the latest version of the Azure Migrate tools and MOC operator.
- Review migration settings to ensure the virtual DVD is not included.
- Retry the migration after ejecting or detaching the virtual DVD.
- Ensure no processes inside the VM are using the virtual DVD.
- Check migration logs for any additional error details.
Azure Migrate gives a cannot eject virtual DVD error
Moc-operator cannot eject virtual DVD during migration to Azure local after fail over complete.
5 answers
Sort by: Most helpful
-
Lionel Ong 20 Reputation points
2025-01-05T23:05:45.7733333+00:00 -
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.
-
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.
-
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-vmIf you have any further queries, do let us know.
-
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!
- Report a concern