Closed tampler closed 3 years ago
The management server cannot find a suitable pool (primary) to deploy your VM on @tampler . The message is a bit misleading but the stackttrace tells you:
com.cloud.utils.exception.CloudRuntimeException: Unable to create deployment, no usable volumes found for the VM: 22
at com.cloud.deploy.DeploymentPlanningManagerImpl.findSuitablePoolsForVolumes(DeploymentPlanningManagerImpl.java:1470)
at com.cloud.deploy.DeploymentPlanningManagerImpl.checkClustersforDestination(DeploymentPlanningManagerImpl.java:1126)
at com.cloud.deploy.DeploymentPlanningManagerImpl.planDeployment(DeploymentPlanningManagerImpl.java:530)
at org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.reserveVirtualMachine(VMEntityManagerImpl.java:203)
at org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.reserve(VirtualMachineEntityImpl.java:202)
at com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:4929)
at com.cloud.vm.UserVmManagerImpl.startVirtualMachine(UserVmManagerImpl.java:2901)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@DaanHoogland Okay, and what do I do? I have only a QCOW2 image, which I created on my local machine and can easily run it locally.
Shouldn't volumes be created automatically, when I launch an instance from the QCOW2 template? My instance should use the VM template ROOT system Plus I added an extra volume to it
Note, that CloudStack creates a volume for a new instance automatically, when I use my ISO. I'd expect to have the same functionality when creating an instance for a QCOW2 template.
@tampler, when you deploy a VM from a template CS creates a volume automatically. I saw the log with the error but it doesn't match the steps you have mention:
Create an instance from template
Got error message error
the error in the log says that you're trying to start a VM, but what happened with the failed deployment has to be in another log
And you can't run a VM in error
state from your VM description
"state": "Error"
@tampler in that stacktrace the first line is at com.cloud.deploy.DeploymentPlanningManagerImpl.findSuitablePoolsForVolumes(DeploymentPlanningManagerImpl.java:1470)
, the message is thrown because there is no primary storage pool that contains the image, not because there is no image. @slavkap is probably right when she says that the deployment failed.
Hi @tampler, as @slavkap pointed out the logs you have shared belong to a startVirtualMachine
API:
2021-07-28 18:01:29,789 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp2109798150-519:ctx-148bd1aa ctx-5832b23b) (logid:269f731d) submit async job-130, details: AsyncJobVO {id:130, userId: 2, accountId: 2, instanceType: VirtualMachine, instanceId: 22, cmd: org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"jOX8IVV7LOmU0usFaOqhWjjyWUA","httpmethod":"GET","ctxStartEventId":"348","id":"efb8bc53-a7bc-4f5f-88a7-76315b37bff9","ctxDetails":"{\"interface com.cloud.vm.VirtualMachine\":\"efb8bc53-a7bc-4f5f-88a7-76315b37bff9\"}","ctxAccountId":"2","uuid":"efb8bc53-a7bc-4f5f-88a7-76315b37bff9","cmdEventType":"VM.START"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 279278805452959, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2021-07-28 18:01:29,790 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-0cbc44bc job-130) (logid:08d468e0) Executing AsyncJobVO {id:130, userId: 2, accountId: 2, instanceType: VirtualMachine, instanceId: 22, cmd: org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"jOX8IVV7LOmU0usFaOqhWjjyWUA","httpmethod":"GET","ctxStartEventId":"348","id":"efb8bc53-a7bc-4f5f-88a7-76315b37bff9","ctxDetails":"{\"interface com.cloud.vm.VirtualMachine\":\"efb8bc53-a7bc-4f5f-88a7-76315b37bff9\"}","ctxAccountId":"2","uuid":"efb8bc53-a7bc-4f5f-88a7-76315b37bff9","cmdEventType":"VM.START"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 279278805452959, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
Can you please repeat the deployment of a new VM from the template and share the logs for the deployVirtualMachine
API?
This error was a result of SSVM misconfiguration. Before deploying VMs, make sure to have ssvm-check.sh
running without errorrs
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
KVM Hypervisor Basic Zone Storage: virtio
OS / ENVIRONMENT
Ubuntu 20.04.2
SUMMARY
I was trying to create an instance from template and failed with:
STEPS TO REPRODUCE
virtio
10GB drive for storagefile image.qcow2
- QEMU QCOW2 Image (v3), 10737418240 bytesqcow2
image in CloudStackEXPECTED RESULTS
ACTUAL RESULTS