Skip to content

ImportVolumeCmd fails for SharedMountPoint primary storage with "not supported" error on KVM #12954

@prashanthr2

Description

@prashanthr2

problem

Importing a volume using ImportVolumeCmd into a KVM cluster with SharedMountPoint primary storage fails with:

Importing and unmanaging volume are not supported for pool type SharedMountPoint on hypervisor KVM

This failure is triggered by an explicit validation in
VolumeImportUnmanageManagerImpl.checkIfHostAndPoolSupported.

While documentation specifies NFS-only support for importVM, SharedMountPoint is also a filesystem-based shared storage type. Its exclusion seems unnecessary and may indicate a gap. Allowing SharedMountPoint or clarifying the rationale for this restriction would help improve consistency.

Note: SharedMountPoint is filesystem-based shared storage similar to NFS and is accessible across hosts. Since importVolume operates on disk files, its exclusion appears unnecessary and inconsistent.

Below is the error we see in the logs

AsyncJob Details:
AsyncJob {"accountId":2,"cmd":"org.apache.cloudstack.api.command.admin.volume.ImportVolumeCmd","cmdInfo":"{"apikey":"LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q","signature":"2M1gjsfL5vF5kPTa4tZAdYnxml4\u003d","httpmethod":"GET","ctxAccountId":"2","cmdEventType":"VOLUME.IMPORT","diskofferingid":"8054af63-fd9a-4146-bed6-45c4d24f443f","path":"Centos7_vm-3312_disk1.qcow2","response":"json","ctxUserId":"2","name":"Centos7_vm-3312_disk1.qcow2","zoneid":"dd4e5f2d-13a4-4761-a81c-6369cbc1d594","ctxStartEventId":"171","ctxDetails":"{\"interface com.cloud.storage.StoragePool\":\"27e26ae8-ec2f-4877-b65b-b64bb382406a\",\"interface com.cloud.offering.DiskOffering\":\"8054af63-fd9a-4146-bed6-45c4d24f443f\"}","storageid":"27e26ae8-ec2f-4877-b65b-b64bb382406a"}","cmdVersion":0,"completeMsid":null,"created":null,"id":52,"initMsid":32986254803627,"instanceId":null,"instanceType":"None","lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"31a45eb1-56c0-4dff-b195-e7b165b522ad"}

StoragePool Type:

(localcloud) 🐱 > list storagepools id=27e26ae8-ec2f-4877-b65b-b64bb382406a
{
  "count": 1,
  "storagepool": [
    {
      "capacitybytes": 105088286720,
      "clusterid": "91d8794b-93b5-4ca1-8e8c-b72ac0b28e93",
      "clustername": "p1-c1",
      "created": "2026-04-02T17:29:13+0000",
      "details": {},
      "disksizeallocated": 17179869184,
      "disksizetotal": 105088286720,
      "disksizeused": 1520435200,
      "hasannotations": false,
      "hypervisor": "KVM",
      "id": "27e26ae8-ec2f-4877-b65b-b64bb382406a",
      "ipaddress": "localhost",
      "istagarule": false,
      "managed": false,
      "name": "Shared-Mount-Point",
      "overprovisionfactor": "2.0",
      "path": "/sharedmountpoint",
      "podid": "a854c882-dc6e-4754-a3f5-891a58bb288b",
      "podname": "Pod1",
      "provider": "DefaultPrimary",
      "scope": "CLUSTER",
      "state": "Up",
      "storagecapabilities": {
        "VOLUME_SNAPSHOT_QUIESCEVM": "false"
      },
      "type": "SharedMountPoint",
      "zoneid": "dd4e5f2d-13a4-4761-a81c-6369cbc1d594",
      "zonename": "ref-trl-11483-k-Ma9"
    }
  ]
}

Exception Seen:

2026-04-02 17:50:51,722 ERROR [o.a.c.s.v.VolumeImportUnmanageManagerImpl] (API-Job-Executor-36:[ctx-d214117f, job-52, ctx-830a8cd9]) (logid:31a45eb1) Importing and unmanaging volume are not supported for pool type SharedMountPoint on hypervisor KVM
2026-04-02 17:50:51,722 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-36:[ctx-d214117f, job-52]) (logid:31a45eb1) Unexpected exception while executing org.apache.cloudstack.api.command.admin.volume.ImportVolumeCmd com.cloud.utils.exception.CloudRuntimeException: Importing and unmanaging volume are not supported for pool type SharedMountPoint on hypervisor KVM
        at org.apache.cloudstack.storage.volume.VolumeImportUnmanageManagerImpl.logFailureAndThrowException(VolumeImportUnmanageManagerImpl.java:129)
        at org.apache.cloudstack.storage.volume.VolumeImportUnmanageManagerImpl.checkIfHostAndPoolSupported(VolumeImportUnmanageManagerImpl.java:340)
        at org.apache.cloudstack.storage.volume.VolumeImportUnmanageManagerImpl.listVolumesForImportInternal(VolumeImportUnmanageManagerImpl.java:247)
        at org.apache.cloudstack.storage.volume.VolumeImportUnmanageManagerImpl.getVolumeOnStorageAndCheck(VolumeImportUnmanageManagerImpl.java:229)
        at org.apache.cloudstack.storage.volume.VolumeImportUnmanageManagerImpl.importVolume(VolumeImportUnmanageManagerImpl.java:196)
        at org.apache.cloudstack.api.command.admin.volume.ImportVolumeCmd.execute(ImportVolumeCmd.java:152)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:173)
        at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:110)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:698)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:646)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)

versions

CloudStack version: 4.x (please replace with your exact version)
Hypervisor: KVM
Primary storage: SharedMountPoint (clustered filesystem mounted on all hosts)

The steps to reproduce the bug

  1. Configure a KVM cluster with SharedMountPoint primary storage
  2. Ensure storage is mounted on all hosts at the same path
  3. Attempt to import a volume (e.g., QCOW2 disk) using ImportVolumeCmd
  4. Observe failure with "not supported for pool type SharedMountPoint"

What to do about it?

ImportVolumeCmd currently supports NFS, Ceph, and Local primary storage on KVM. SharedMountPoint is also a valid shared filesystem-based primary storage type on KVM and should be treated consistently.

Validation logic should include:
NetworkFilesystem (NFS)
RBD (Ceph)
Filesystem (Local storage)
SharedMountPoint

instead of explicitly rejecting SharedMountPoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions