Cannot dispatch VM: No host meets capacity and sched_requirements

Please, describe the problem here and provide additional information below (if applicable) …

I am a newbie, I just installed OpenNebula a few days ago. There is a Froent-End and a hypervisor. When I try to create my first VM on it, I always get the following error message:Cannot dispatch VM: No host meets capacity and SCHED_REQUIREMENTS: (CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED) & ( (HYPERVISOR=kvm) & (CLUSTER_ID = 0) & (HOST_ID = 0) )


Versions of the related components and OS (frontend, hypervisors, VMs):

Version of OS: Ubuntu 24.04.1 LTS
OpenNebula: 6.10
DB: MariaDB 10.11.8

Version of VM: Linux Mint 22

Steps to reproduce:

  1. Create an empty disk image and an ISO iamge
  2. Create a template
  3. Press “Instantiate” button on the created template to power on the VM

Current results:

Expected results:
to run a VM

There is an UI issue that incorrectly give “(HOST_ID = 20)”
It needs to be (ID = 20)

where 20 is whatever physical host number your are trying to force assignment to vs the scheduler picking any host with available resources in your cluster.

please see this post for more details:

Thank you so much! It fixed the issue.
However, I got another error message: Cannot dispatch VM: No host with enough capacity to deploy the VM.

The host should has enough resource, as shown below

I’m a new users of Open Nebula too, so next steps might be best left to the experts.

That being said… I would first look at this log for more details as to which resource is short. Its typically going to be memory, cpu, or storage.
At the your host running open nebula processes:

less /var/log/one/sched.log

I’m not sure the size of the VM your are attempting to launch, but your screen shot of the single host has only 20GB memory and 10vCPU (not sure of the units there). Is your VM larger than that?

Thank you so much for your kind reply.
The following is the log:

Mon Dec 16 19:54:40 2024 [Z0][VM][D]: Found 1 pending/rescheduling VMs.
Mon Dec 16 19:54:40 2024 [Z0][HOST][D]: Discovered 1 enabled hosts.
Mon Dec 16 19:54:40 2024 [Z0][VM][D]: VMs in VMGroups:

Mon Dec 16 19:54:40 2024 [Z0][VNET][D]: Discovered 1 vnets.
Mon Dec 16 19:54:40 2024 [Z0][SCHED][D]: Match-making results for VM 21:
Cannot schedule VM, there is no suitable system ds.

Mon Dec 16 19:54:40 2024 [Z0][SCHED][D]: Dispatching VMs to hosts:
VMID Priority Host System DS

The size of the VM is 2GB RAM and 4 vCPUs.

I believe “ds” is datastore. Looks like you don’t have enough space or appropriate datastore. Look under Storage/datastores on the web UI and make sure a DS that is large enough is associated with your host/cluster.

It’s so weird, each of the DS has 492GB capacity, and only 16GB has been occupied.

I’d double check that each of those DS have been associated with the same cluster that your host is in. Click the datastore, and then the “cluster” tab.

I’ve also found it helpful to increase the scheduler log verbosity. It might give more info. It will get chatty so you might want to turn it down after you are done.

edit this here: Set to 5. /etc/one/sched.conf

LOG = [
  SYSTEM      = "file",
  DEBUG_LEVEL = 5
]

Hello,

Thanks again for your attention on this matter!
May I ask if it is necessary to restart any services?
After adjusting the debug level to 5, I can only find the same error message in the sched.log, without any detailed information, as shown below:
Tue Dec 17 16:04:46 2024 [Z0][VM][D]: Found 1 pending/rescheduling VMs.
Tue Dec 17 16:04:46 2024 [Z0][HOST][D]: Discovered 1 enabled hosts.
Tue Dec 17 16:04:46 2024 [Z0][VM][D]: VMs in VMGroups:

Tue Dec 17 16:04:46 2024 [Z0][VNET][D]: Discovered 1 vnets.
Tue Dec 17 16:04:46 2024 [Z0][SCHED][D]: Match-making results for VM 27:
Cannot schedule VM, there is no suitable system ds.

Tue Dec 17 16:04:46 2024 [Z0][SCHED][D]: Dispatching VMs to hosts:
VMID Priority Host System DS
--------------------------------------------------------------

oh yes, my bad I should have mentioned that. Assuming you have root/sudo access:

systemctl status opennebula-scheduler.service 
systemctl restart opennebula-scheduler.service 
systemctl status opennebula-scheduler.service 

Note you can do the following to see the running services. Note my example is on Ubuntu22.04 minione, not a production env that may list differently per node.

root@openneb:/var/lib/one# systemctl list-unit-files | grep opennebula 
opennebula-fireedge.service                enabled         enabled
opennebula-flow.service                    enabled         enabled
opennebula-gate.service                    enabled         enabled
opennebula-guacd.service                   disabled        enabled
opennebula-hem.service                     disabled        enabled
opennebula-novnc.service                   disabled        enabled
opennebula-scheduler.service               disabled        enabled
opennebula-showback.service                static          -
opennebula-ssh-agent.service               disabled        enabled
opennebula-ssh-socks-cleaner.service       static          -
opennebula-sunstone.service                enabled         enabled
opennebula.service                         enabled         enabled
opennebula-showback.timer                  disabled        enabled
opennebula-ssh-socks-cleaner.timer         disabled        enabled
root@openneb:/var/lib/one# 

Thank you so much!

The following is the detailed information of sched.log
Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Getting VM and Host information. Total time: 0.05s
Tue Dec 17 12:01:45 2024 [Z0][VMGRP][DDD]: VM Group Scheduling information

Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Setting VM groups placement constraints. Total time: 0.00s
Tue Dec 17 12:01:45 2024 [Z0][RANK][DD]: Rank evaluation for expression : RUNNING_VMS
Tue Dec 17 12:01:45 2024 [Z0][RANK][DD]: ID: 0 Rank: 1
Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: System DS 0 discarded for VM 28. It does not fulfill SCHED_DS_REQUIREMENTS.
Tue Dec 17 12:01:45 2024 [Z0][SCHED][D]: Match-making results for VM 28:
Cannot schedule VM, there is no suitable system ds.

Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Match Making statistics:
Number of VMs: 1
Total time: 0s
Total Cluster Match time: 0s
Total Host Match time: 0.00s
Total Host Ranking time: 0.00s
Total DS Match time: 0.00s
Total DS Ranking time: 0s
Total Network Match time: 0s
Total Network Ranking time:0s

Tue Dec 17 12:01:45 2024 [Z0][SCHED][DDD]: Scheduling Results:

Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Match scheduled resources, sort by priorities. Total time: 0.01s
Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Call external Scheduler. Total time: 0.00s
Tue Dec 17 12:01:45 2024 [Z0][SCHED][D]: Dispatching VMs to hosts:
VMID Priority Host System DS
--------------------------------------------------------------

Tue Dec 17 12:01:45 2024 [Z0][SCHED][DD]: Dispatching VMs to hosts. Total time: 0.00s

I think you are now beyond my knowledge; as I’m also a new Open Nebula users.

I can only think to also double check your VM template that your are triggering the VM from and be sure you are selecting a valid datastore.

Maybe include the “template” info so others can check its setting against your above datastore output. You can get the template info off the VM tab on Web UI or via CLI with " onevm show -j"

Thanks again!
I will check the template and VM.
Happy Holidays!

I just accidentally ran a VM and compared the template of the VM that worked and the one that failed, and the only difference between them is that the template of the VM that worked has “TM_MAD_SYSTEM”: “ssh”. But I don’t know where to configure it via the UI