We haven’t yet upgraded our OpenNebula infrastructure to 4.12, but have plans to do so, based on the added feature of assigning a cost per CPU/RAM unit, per hour.
Currently however, on our 4.8 deployment, when a VM is ‘powered off’, it is still assigned the CPU/RAM resources on the host its been deployed to, and reflects such in the resource utilization graphs on the dashboard.
The point of assigning a cost per CPU/RAM unit per hour, is to be able to use and monetize any of those resources that are not in use from a ‘powered off’ VM. Does 4.12 free up those assigned resources from the powered off VM, until its next boot up? If not, as it doesn’t in 4.8, is there some sort of setting check for it, or work-around to be able to utilize those un-used resources elsewhere?
For the showback cost, we are only adding the time a VM is running. To be precise, this includes the time it takes for the prolog, boot, and epilog phases.
VMs in the poweroff or suspended states do not add to the monthly cost. But they still count towards the allocated host capacity. This is intentional, because this capacity is actually honored by the scheduler. Even if the VM is in poweroff/suspened, the files are in that host, and it can be booted immediately. OpenNebula is guaranteeing that the host has enough resources for that immediate boot.
In your case, it sounds like you want to use the undeploy/stop commands. In this case, the VM is saved in the system DS, not in the host, and the capacity is freed. But because the capacity is now free to be used by new VMs, the saved VMs will not boot immediately, they are moved to ‘pending’ and have to wait for the scheduler to find enough free space.