Remove VMs from Opennebula Dashboard without deleting from vCenter

OpenNebula 5.2

I just want to Remove VMs from Opennebula Dashboard without deleting from vCenter. Do we have any way to achieve this task.

Please also help me to understand the difference between Allocated CPU and Real CPU . My allocated CPU is showing 105% but real CPU is 60% same apply for Memory also .

Hi Ranveer.

I’ll start answering your second question. The reason of the difference between your allocated and real values is related with the state of your VMs. When a VM is in the poweroff state, OpenNebula assumes that it can be resumed later so it keeps the CPU and Memory, used by that VM, as allocated. Therefore though real CPU and memory are not being used by those VMs, OpenNebula track those values as allocated.

About the first question, documentation states that the following resources are deleted in vCenter when deleted in OpenNebula so, when you terminate or delete a VM it would be deleted from vCenter:

  • Images
  • Virtual Machines

If you only want to hide those VMs to some users, you could try to play with permissions so some users/groups are not granted to see those VMs in the dashboard though they are running… and perhaps you could use a hook so a VM changes its permissions once it enters the running state… In any case, of course, the source code could be changed to your specific needs.

Cheers!

Thanks for your support ,but in my vCenter environment i have all the vm’s up and running then why these difference, and what i have notice if i reduce 1vcpu from vcenter it will reduce 100 allocated cpu .

Hi Ranveer!
I understand. if your VM are all running then I guess that allocated memory and cpu would be the sum of all the memory and cpu values that you’ve set when instantiating your VMs in OpenNebula.

Real values for memory and cpu are provided by vCenter to OpenNebula while monitoring clusters… so you can have real values lower than allocated values, for example you may have allocated 2GB for a VM but real used memory is only 128 MB.

If you have a 105% allocated value for CPU that means that you have allocated more CPU resources than the real capacity of your vCenter nodes, so if all your VM’s are running you’re overcommiting the CPU. Do you also have more allocated memory than real memory?, if I’m not wrong by default there is no overcommitment of memory in OpenNebula so maybe documentation is wrong.

Cheers!

Thank you for you support .