Error: "Importing powered on vm <VM Name> (...) to different datastore ... is not supported" when importing a VM to VCD
search cancel

Error: "Importing powered on vm <VM Name> (...) to different datastore ... is not supported" when importing a VM to VCD

book

Article ID: 429457

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Import of a VM to VCD fails when the VM Home folder and any Hard disk reside in multiple storage policies. 
  • Auto import of VM fails
  • Import using the VCD UI fails
  • Import using the ImportVmAsVApp API fails
  • Similar error messages are seen in the vcloud-container-debug.log files:

    ERROR    | Backend-activity-pool-### | ImportServiceImpl              | importing a powered on vm <VM Name> with moref vm-#### and disk profile [<Storage Policy Name>] to different datastore <Datastore Name> is not supported | activity=(com.vmware.vcloud.activities.vcresiliency.CreateAutoManagedVAppActivity,urn:uuid:########-####-####-############)
    ERROR    | Backend-activity-pool-### | ImportServiceImpl              | import Singleton VApp failed null | activity=(com.vmware.vcloud.activities.vcresiliency.CreateAutoManagedVAppActivity,urn:uuid:########-####-####-############)
    com.vmware.vcloud.api.presentation.service.BadRequestException: Importing powered on vm <VM Name> (moref vm-#### and disk profile [<Storage Policy Name>]) to different datastore <Datastore Name> is not supported.
  • Using the cell-management-tool debug-auto-import --vm <VM Name> command does not find any reason for skipping the import of the VM.
  • After using the debug-auto-import subcommand, the cell-management-tool.log may have similar entries:

    INFO     | main                      | CellManagementTool             | Arguments provided: debug-auto-import --vm <VM Name> |
    INFO     | main                      | VMAutoImportDebugCommand       | VM with name:<VM Name>, moref vm-### in VC <VC Name> can be skipped for the following reasons:
    System could not find any reason for skipping this VM

Environment

VMware Cloud Director 10.5.x

VMware Cloud Director 10.6.x

Cause

  • Importing a powered on VM is not supported in the VCD UI.
  • The API can be used to import powered on VC VM into VCD with strict requirements:
    • VM must be running on resources that are available to the Org VDC where it is being imported.
    • That includes compute (cluster), storage policies and network port group.
  • VCD does not support "live" storage migration (Storage vMotion) during the import process.
  • Import of a powered on VM will fail if any storage migration is required.
  • The VM's current storage configuration must perfectly align with the target VDC storage policy before the import can succeed.

 

Resolution

  • Power off the VM and import it.
  • If that is not possible, ensure the VM Home folder and any Hard disk reside on the same target storage policy.

Additional Information

VMware Cloud Director API - ImportVmAsVAppParams

Discovering and Adopting VMs in VMware Cloud Director

Import a Virtual Machine as a vApp