# Hardware or VM for one controller

**URL:** <https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249>\
**Category:** Product Support\
**Created:** [November 8, 2016, 8:19pm UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249 "2016-11-08T20:19:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 8, 2016, 8:19pm UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/1 "2016-11-08T20:19:23Z")

</div>

Hi to all.  
Can someone tell me how to use a VM for OpenNebula Controller?  
Let’s assume a totally blank infrastructure, with some servers to be used as compute nodes in OpenNebula.  
To use these servers, I need a working opennebula controller.  
To make a working One Controller, I need at least a server for it or another hypervisor where to place the controller.

This is similiar to the chicken and egg dilemma. I would like to use a totally virtualized cloud, but I can’t create the cloud without the controller and I can’t create the controller without the cloud 🙂

Is a dedicated hardware really needed for OpenNebula controller?

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [November 9, 2016, 7:28am UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/2 "2016-11-09T07:28:45Z")

</div>

Hello, look at my replies in existing topic

> [@Running opennebula as VM and import it afterwards in itself](https://forum.opennebula.io/t/running-opennebula-as-vm-and-import-it-afterwards-in-itself/1057/8):
>
> What is benefit of this? I have Opennebula in VM hsoted on cluster, but I manage that VM by pacemaker. I also plan to do HA with two VM and configure pacemaker placement to have each VM on another host. When I need migrate frontend to other host, I do it by pacemaker. Also, when I need to put some cluster node to standby, it automatically migrate running opennebula VM to other suitable host and only then it stops other resources like mouted storage, dlm etc…

> [@Running opennebula as VM and import it afterwards in itself](https://forum.opennebula.io/t/running-opennebula-as-vm-and-import-it-afterwards-in-itself/1057/10):
>
> Hi, you are right. I don’t see any drawback, it is working good. Also you can manage resource inside VMs by pacemaker remote. In opennebula itself, I can see VMs on Wild tab in Host detail. Thats all. When I need to do maintanace, I just put node to standby like before. Pacemaker automatically migrate running VM to other node. I think that is better that self-managing openenbula VMs by opennebula. Actually, I have just one opennebula VM, but I planning to do MariaDB cluster from three VMs an…

---

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 9, 2016, 9:58am UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/3 "2016-11-09T09:58:54Z")

</div>

So, did you install a bare-metal KVM node, manually created a VM to be used as opennebula controller and then added the same kvm node in opennebula ?

Is opennebula smart enough to detect the “wild vm” ram/cpu/disks usage when adding new VMs ?  
Let me try to explain: if the whole node has 64GB RAM, the opennebula controller use 2GB, opennebula is smart enough to only use 62GB for the other VM or still try to allocate 64GB because it doesn’t detect “itself” ?

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [November 9, 2016, 11:53am UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/4 "2016-11-09T11:53:12Z")

</div>

Hi, exactly no, because I have existing HW node for opennebula, so I migrate it to VM, but it works liku you write. You can create cluster of three nodes and run opennebula VM managed by pacemaker.

About resources - you can reserve RAM and CPU in opennebula host (compute node) detail page. Also, opennebula is not CPU demanding and you shod have big swap on compute node. For ex for 64GB ram you should make 8GB swap or more if you want overprovision…

---

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 9, 2016, 12:44pm UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/5 "2016-11-09T12:44:21Z")

</div>

Did you import the wild vm or did you leave it alone?

---

<div class="post-metadata">

**Author:** ![gandalf](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gandalf](https://forum.opennebula.io/u/gandalf)\
**Post date:** [November 9, 2016, 12:47pm UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/6 "2016-11-09T12:47:29Z")

</div>

If i understood properly, opennebula could be made HA by simply clustering the MySQL database  
In case of failover, the new MySQL would be promoted to master and opennebula started on the survived server

If this is true, using ucarp would be easier than corosync/peacemaker

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [November 12, 2016, 1:45am UTC](https://forum.opennebula.io/t/hardware-or-vm-for-one-controller/3249/7 "2016-11-12T01:45:34Z")

</div>

Hello, I leave it alone, no need to be managed itself.

If you need create HA, you should use for ex. Percona XtraDB Cluster and some SW like corosync and pacemaker to manage resources like floating IP, nginx, opennebula daemons etc…
