Skip to content

ImportVM fails for SharedMountPoint primary storage with "Unsupported Storage Pool" error #12944

@prashanthr2

Description

@prashanthr2

problem

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.

Importing a VM using importVm having its qcow2 disk on SharedMountPoint primary storage pf the KVM host fails with error:

Unsupported Storage Pool → Disk not found or is invalid

This happens during CheckVolumeCommand, causing the import workflow to abort.

SharedMountPoint storage is filesystem-based (similar to NFS from a hypervisor perspective), but the current implementation appears to allow only NFS for import, leading to this failure.

Log snippets to confirm the issue

2026-03-31 11:21:02,185 DEBUG [c.c.a.ApiServlet] (qtp1513608173-26:[ctx-adab0dad]) (logid:7aa9d804) ===START===  10.0.113.139 -- GET  
clusterid=362f4ccb-75a5-4054-82a0-f1f3adb348ea&command=importVm&diskpath=Centos7_vm-3312_disk0.qcow2&displayname=Centos7&hypervisor=kvm&importsource=shared&name=Centos7&networkid=320688c8-e81e-4488-a5ad-0341ffe32879&response=json&serviceofferingid=2ce350ae-0ee5-4e9f-aae8-973ab7e94826&storageid=76b0752f-e004-456e-8ded-2f92b2845c28&zoneid=cef2f153-1155-46a5-98ac-a24dc9cf4473

The storagepool used above is SharedMountpoint

(localcloud) 🐱 > list storagepools id=76b0752f-e004-456e-8ded-2f92b2845c28
{
  "count": 1,
  "storagepool": [
    {
      "capacitybytes": 127901106176,
      "clusterid": "362f4ccb-75a5-4054-82a0-f1f3adb348ea",
      "clustername": "p1-c1",
      "created": "2026-03-30T15:42:44+0000",
      "details": {},
      "disksizeallocated": 0,
      "disksizetotal": 127901106176,
      "disksizeused": 1279262720,
      "hasannotations": false,
      "hypervisor": "KVM",
      "id": "76b0752f-e004-456e-8ded-2f92b2845c28",
      "ipaddress": "localhost",
      "istagarule": false,
      "managed": false,
      "name": "SharedMount-Cephfs",
      "overprovisionfactor": "2.0",
      "path": "/cephfs",
      "podid": "00866e4f-0077-4770-afbc-3c14cbfc6edd",
      "podname": "Pod1",
      "provider": "DefaultPrimary",
      "scope": "CLUSTER",
      "state": "Up",
      "storagecapabilities": {
        "VOLUME_SNAPSHOT_QUIESCEVM": "false"
      },
      "type": "SharedMountPoint",
      "zoneid": "cef2f153-1155-46a5-98ac-a24dc9cf4473",
      "zonename": "ref-trl-11329-k-Mr9-prashanth-reddy"
    }
  ]
}

Log snippet from KVM agent showing "Unsupported Storage Pool"

2026-03-31 11:28:39,230 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Request:Seq 3-2684145377912880400:  { Cmd , MgmtId: 32987697643852, via: 3, Ver: v1, Flags: 100011, [{"com.cloud.agent.api.CheckVolumeCommand":{"srcFile":"Centos7_vm-3312_disk0.qcow2","storageFilerTO":{"id":"3","uuid":"76b0752f-e004-456e-8ded-2f92b2845c28","host":"localhost","path":"/cephfs","port":"0","type":"SharedMountPoint"},"wait":"0","bypassHostMaintenance":"false"}}] }
2026-03-31 11:28:39,230 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Processing command: com.cloud.agent.api.CheckVolumeCommand
2026-03-31 11:28:39,230 INFO  [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Trying to fetch storage pool 76b0752f-e004-456e-8ded-2f92b2845c28 from libvirt
2026-03-31 11:28:39,230 DEBUG [kvm.resource.LibvirtConnection] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Looking for libvirtd connection at: qemu:///system

2026-03-31 11:28:40,246 DEBUG [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Successfully refreshed pool 76b0752f-e004-456e-8ded-2f92b2845c28 Capacity: (118.94 GB) 127708168192 Used: (1.19 GB) 1275068416 Available: (117.75 GB) 126433099776
2026-03-31 11:28:40,246 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-3:[]) (logid:d2b37ca5) Seq 3-2684145377912880400:  { Ans: , MgmtId: 32987697643852, via: 3, Ver: v1, Flags: 10, [{"com.cloud.agent.api.Answer":{"result":"false","details":"Unsupported Storage Pool","wait":"0","bypassHostMaintenance":"false"}}] }

the job eventually fails on Management Server as below

2026-03-31 11:28:40,247 DEBUG [c.c.a.t.Request] (API-Job-Executor-38:[ctx-8abb7d09, job-51, ctx-69bc9bf2]) (logid:d2b37ca5) Seq 3-2684145377912880400: Received:  { Ans: , MgmtId: 32987697643852, via: 3(ref-trl-11329-k-Mr9-prashanth-reddy-kvm3), Ver: v1, Flags: 10, { Answer } }
2026-03-31 11:28:40,247 DEBUG [c.c.a.m.ClusteredAgentManagerImpl] (API-Job-Executor-38:[ctx-8abb7d09, job-51, ctx-69bc9bf2]) (logid:d2b37ca5) Details from executing class com.cloud.agent.api.CheckVolumeCommand: Unsupported Storage Pool
2026-03-31 11:28:40,270 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-38:[ctx-8abb7d09, job-51]) (logid:d2b37ca5) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.ImportVmCmd com.cloud.utils.exception.CloudRuntimeException: Disk not found or is invalid
        at org.apache.cloudstack.vm.UnmanagedVMsManagerImpl.importKvmVirtualMachineFromDisk(UnmanagedVMsManagerImpl.java:2857)
        at org.apache.cloudstack.vm.UnmanagedVMsManagerImpl.importKvmInstance(UnmanagedVMsManagerImpl.java:2626)
        at org.apache.cloudstack.vm.UnmanagedVMsManagerImpl.importVm(UnmanagedVMsManagerImpl.java:1578)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:109)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
        at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
        at jdk.proxy3/jdk.proxy3.$Proxy538.importVm(Unknown Source)
        at org.apache.cloudstack.api.command.admin.vm.ImportVmCmd.execute(ImportVmCmd.java:289)
        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)

2026-03-31 11:28:40,271 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-38:[ctx-8abb7d09, job-51]) (logid:d2b37ca5) Complete async job-51, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530","errortext":"Disk not found or is invalid"}

Note: Both NetworkFilesystem and SharedMountPoint represent shared file-based storage accessible across hosts, and importVM should not be restricted to NFS-only.

versions

CloudStack version: 4.22
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 VM by providing a QCOW2 disk using the importVm API
  4. Observe failure with "Unsupported Storage Pool" and "Disk not found or is invalid"

What to do about it?

ImportVM should support SharedMountPoint primary storage (shared filesystem-based storage) similar to NFS.

Validation logic should allow:
NetworkFilesystem (NFS)
SharedMountPoint

Instead of restricting import to NFS-only.

Both NetworkFilesystem and SharedMountPoint represent shared file-based storage accessible across hosts, and importVM should not be restricted to NFS-only.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions