Storage pressure in OpenNebula often appears as image uploads that stall, VM deployments that remain pending, or backup jobs that cannot reserve space. Datastore monitoring ties those symptoms to capacity, state, image count, and the storage drivers that move disks between the front-end, datastores, and hypervisor hosts.
The onedatastore CLI shows both the datastore pool summary and the detailed object record. The list view is the fastest check for STAT, SIZE, AVA, TYPE, DS, and TM, while the show view exposes the base path, capacity block, driver attributes, and stored image IDs for one datastore.
System datastores need a separate check when local storage is involved, because the datastore summary can show no global size while each host has its own local system datastore capacity. OpenNebula refreshes datastore values on the daemon's datastore monitoring interval, so compare OpenNebula output with the relevant host or filesystem view before treating a stale number as current free space.
Steps to monitor OpenNebula datastore capacity and state:
- List the datastore pool.
$ onedatastore list ID NAME SIZE AVA CLUSTERS IMAGES TYPE DS TM STAT 2 files 50G 86% 0 0 fil fs local on 1 default 50G 86% 0 2 img fs local on 0 system - - 0 0 sys - local on
STAT should show on for datastores available to normal operations. SIZE and AVA show the monitored capacity for datastores that expose a pool-wide capacity value.
- Show the target datastore record.
$ onedatastore show default DATASTORE 1 INFORMATION ID : 1 NAME : default USER : oneadmin GROUP : oneadmin CLUSTERS : 0 TYPE : IMAGE DS_MAD : fs TM_MAD : local BASE PATH : /var/lib/one//datastores/1 DISK_TYPE : FILE STATE : READY DATASTORE CAPACITY TOTAL: : 50G FREE: : 43.2G USED: : 6.8G LIMIT: : - DATASTORE TEMPLATE DS_MAD="fs" TM_MAD="local" TYPE="IMAGE_DS" IMAGES 0 1
DS_MAD identifies the datastore driver, and TM_MAD identifies the transfer manager used when VM disks are cloned, linked, moved, or deleted.
- Check which images are stored in the target image or files datastore.
$ oneimage list ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS 0 oneadmin oneadmin ubuntu-24.04 default 3.1G OS No rdy 0 1 oneadmin oneadmin app-data default 20G DB Yes rdy 1 2 oneadmin oneadmin init.iso files 720M CD No rdy 0
The DATASTORE column should match the datastore being checked, and RVMS shows whether an image is referenced by running VMs.
- List hosts before checking a local system datastore.
$ onehost list ID NAME CLUSTER RVM TCPU FCPU ACPU TMEM FMEM AMEM STAT 0 host01 default 3 800 520 800 31.1G 18.2G 31.1G on 1 host02 default 2 800 610 800 31.1G 21.4G 31.1G on
- Check local system datastore capacity on the host that may receive the VM.
$ onehost show host01 HOST 0 INFORMATION ID : 0 NAME : host01 CLUSTER : default STATE : MONITORED IM_MAD : kvm VM_MAD : kvm LAST MONITORING TIME : 06/25 09:35:18 HOST SHARES RUNNING VMS : 3 ##### snipped ##### LOCAL SYSTEM DATASTORE #0 CAPACITY TOTAL: : 467.7G USED: : 113.5G FREE: : 354.2G
Use onehost show when the system datastore reports SIZE and AVA as - or when the TM driver uses host-local storage.
- Compare a file-backed datastore with the backing filesystem on the server that owns the base path.
$ df -h /var/lib/one/datastores/1 Filesystem Size Used Avail Use% Mounted on /dev/vdb1 50G 6.8G 44G 14% /var/lib/one/datastores
For Ceph, SAN, backup, or remote object storage drivers, use the storage platform's own capacity tools instead of treating the front-end filesystem as the datastore backend.
- Recheck the datastore summary after the next datastore monitoring cycle.
$ onedatastore list ID NAME SIZE AVA CLUSTERS IMAGES TYPE DS TM STAT 2 files 50G 86% 0 0 fil fs local on 1 default 50G 86% 0 2 img fs local on 0 system - - 0 0 sys - local on
MONITORING_INTERVAL_DATASTORE in /etc/one/oned.conf controls the datastore monitoring cycle. If the value remains stale after the next cycle, inspect /var/log/one/oned.log and the opennebula service before changing datastore placement or capacity limits.
Related: How to manage OpenNebula services with systemctl in Linux
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.