SRM Planned Migration fails with the error - Cannot unmount datastore from host
search cancel

SRM Planned Migration fails with the error - Cannot unmount datastore from host

book

Article ID: 312738

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:
In VMware vCenter Site Recovery Manager 8.x, you experience the following symptoms:
  • A recovery job during a planned migration never completes.
  • You have to check the Recovery report to see the actual errors.

  • You see an error message similar to:

    Cannot unmount datastore from host . The resource is in use
     
  • In the Site Manager Logs on the Data Recovery site, you see messages similar to:

    hostName = ">",
    --> host = 'vim.HostSystem:host-56',
    --> datastoreName = ">",
    --> datastore = 'vim.Datastore:datastore-67',
    --> msg = "Cannot unmount datastore '
    >' from host '>'. The resource '>' is in use.",
    --> key = "com.vmware.vim.datastore.error.unmountVmfsVolumeFailed",
    --> arg = (vmodl.KeyAnyValue) [
    --> (vmodl.KeyAnyValue) {
    --> dynamicType = ,
    --> key = "name",
    --> value = "
    >",
    --> },
    --> (vmodl.KeyAnyValue) {
    --> dynamicType = ,
    --> key = "reason",
    --> value = "storageIORMEnabled",
    --> }
    --> ],
    --> message = ,
    --> }
    --> ],
    --> type = ,
    --> name = "
    >",
    --> msg = "The resource '
    >' is in use."
    --> },
    --> hostName = "
    >",
    --> host = 'vim.HostSystem:host-59',
    --> datastoreName = "
    >",
    --> datastore = 'vim.Datastore:datastore-67',
    --> msg = "Cannot unmount datastore '
    >' from host '>'. The resource '>' is in use.",
    --> }
    --> ],
    --> msg = "Cannot unmount datastore '
    >' from host '>'. The resource '>' is in use. Cannot unmount datastore '>' from host '>'. The resource '>' is in use. Cannot unmount datastore '>' from host '>'. The resource '>' is in use. Cannot unmount datastore '>' from host '>'. The resource '>' is in use. Cannot unmount datastore '>' from host '>'. The resource '>' is in use. Cannot unmount datastore '>' from host '>'. The resource '>' is in use.",
    --> }


Environment

VMware Site Recovery Manager 8.x

Cause

  • This issue occurs when SRM cleans the production site for the failover in a Planned Migration.
  • Site Recovery Manager 8.x unregisters the virtual machines in the production site and unmounts the VMFS volume.
    • The datastore cannot be unmounted because SIOC is enabled.
    • The datastore cannot be unmounted because unprotected VMs exist on datastore.
Note: When you have Storage DRS enabled, Storage IO Control, virtual machines, or templates registered on the VMFS volume, vCenter is not able to unmount the VMFS volume, resulting in an error.

Resolution


To resolve this issue, you must manually unmount the VMFS volume. You must verify the following conditions before you can successfully unmount the datastore:

  • No virtual machines or templates reside on the datastore.
  • The datastore is not a part of a Datastore Cluster.
  • The datastore is not managed by Storage DRS.
  • Storage I/O Control is disabled for this datastore.
  • The datastore is not used for vSphere HA Heartbeat.

To remove the datastore:

  1. vMotion the unprotected virtual machines to another datastore.
  2. Disable Storage I/O control on the datastore. For more information, see Troubleshooting Storage I/O Control (1022091).
  3. Perform a planned migration in Site Recovery Manager to verify.
  4. Put the host in maintenance mode & restart the management agents of ESXi
  5. Reboot the host, if none of the above steps work. 



Additional Information


For more information, see:
  • How to detach a LUN device from ESXi hosts (2004605)
  • Removing an inaccesible NFS datastore with SIOC enabled fails (2008507)