# How to automatically deploy a new VM

**URL:** <https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440>\
**Category:** Product Support\
**Created:** [September 25, 2018, 1:42pm UTC](https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440 "2018-09-25T13:42:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saint](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@saint](https://forum.opennebula.io/u/saint)\
**Post date:** [September 25, 2018, 1:42pm UTC](https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440/1 "2018-09-25T13:42:25Z")

</div>

Hi all,

I have an issue where when a new user tries to instantiate a VM, I (the admin) always have to manually deploy them. Is there a trick to have open nebula automatically deploy new VM for users ? thank you.

---

<div class="post-metadata">

**Author:** ![kingbuffalo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/kingbuffalo/32/5672_2.png) [@kingbuffalo](https://forum.opennebula.io/u/kingbuffalo)\
**Post date:** [September 30, 2018, 8:12pm UTC](https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440/2 "2018-09-30T20:12:38Z")

</div>

What’s your resource usage like on your hosts ? E.g. when I have this issue in labs it’s because the host has allocated CPU over it’s limit (even if real CPU is low)

Check the logs for the vm or tail the ones log

Tail -f /var/log/one/oned.log

If that’s the case then maybe over commit your CPU

---

<div class="post-metadata">

**Author:** ![svega](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/svega/32/5504_2.png) [@svega](https://forum.opennebula.io/u/svega)\
**Post date:** [September 30, 2018, 10:20pm UTC](https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440/3 "2018-09-30T22:20:14Z")

</div>

According to ITU’s Cloud Computing reference architecture, one of the functional requirements for Cloud Computing is Service automation (exactly what you are trying to pull off). This is a forced requirement on any Cloud Computing platform.

OpenNebula manages this with a component called scheduler. First, you should check opennebula-scheduler service to see if it is running (it should). By default, OpenNebula’s scheduler runs every 30s and attempts to deploy VMs in pending state. If nothing gets deployed, most likely you don’t have any suitable host. Check the output from /var/log/one/sched.log. Shceduler’s configurations can be found on /etc/one/sched.conf.

---

<div class="post-metadata">

**Author:** ![saint](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@saint](https://forum.opennebula.io/u/saint)\
**Post date:** [October 1, 2018, 12:29pm UTC](https://forum.opennebula.io/t/how-to-automatically-deploy-a-new-vm/6440/4 "2018-10-01T12:29:53Z")

</div>

Found the issue. After changing the oneadmin password and restarting opennebula, the scheduler does not restart, therefore does not read the new one\_auth, therefore can’t run.  
ticket opened with bug request.
