# \[Resolved\] Not able to create a more then one VM on OpenNebula

**URL:** <https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868>\
**Category:** Product Support\
**Created:** [February 29, 2016, 11:49am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868 "2016-02-29T11:49:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit\_Sharma](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Amit\_Sharma](https://forum.opennebula.io/u/Amit_Sharma)\
**Post date:** [February 29, 2016, 11:49am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/1 "2016-02-29T11:49:55Z")

</div>

Hello,  
I am setting up opennebula on two node cluster (One Head and one Worker node).  
I have completed all the installation and configuration part, but stuck at VM creation.  
My problem is that I am not able to create more then one VM. If I have one VM which is in running state, all the remaining will go to failed state.  
log file for that:

`Tue Mar 1 09:45:28 2016 [DiM][I]: New VM state is ACTIVE. Tue Mar 1 09:45:28 2016 [LCM][I]: New VM state is PROLOG. Tue Mar 1 09:47:58 2016 [TM][I]: /usr/lib/ruby/1.8/open3.rb:73: warning: Insecure world writable dir /opt in PATH, mode 040777 Tue Mar 1 09:47:58 2016 [TM][I]: clone: Cloning /var/lib/one/datastores/1/4d03488de689226edda6022fcd90c368 in c4:/var/lib/one//datastores/0/52/disk.0 Tue Mar 1 09:47:58 2016 [TM][I]: ExitCode: 0 Tue Mar 1 09:48:00 2016 [TM][I]: /usr/lib/ruby/1.8/open3.rb:73: warning: Insecure world writable dir /opt in PATH, mode 040777 Tue Mar 1 09:48:00 2016 [TM][I]: context: Generating context block device at c4:/var/lib/one//datastores/0/52/disk.1 Tue Mar 1 09:48:00 2016 [TM][I]: ExitCode: 0 Tue Mar 1 09:48:00 2016 [LCM][I]: New VM state is BOOT Tue Mar 1 09:48:00 2016 [VMM][I]: Generating deployment file: /var/lib/one/vms/52/deployment.0 Tue Mar 1 09:48:01 2016 [VMM][I]: ExitCode: 0 Tue Mar 1 09:48:01 2016 [VMM][I]: Successfully execute network driver operation: pre. Tue Mar 1 09:48:01 2016 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /var/lib/one//datastores/0/52/deployment.0 c4 52 c4 Tue Mar 1 09:48:01 2016 [VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/52/deployment.0 Tue Mar 1 09:48:01 2016 [VMM][I]: error: internal error process exited while connecting to monitor: 2016-02-29T11:12:51.599689Z kvm: Failed to start VNC server on `127.0.0.1:-892’: socket bind failed: Address already in use  
Tue Mar 1 09:48:01 2016 [VMM][I]:  
Tue Mar 1 09:48:01 2016 [VMM][E]: Could not create domain from /var/lib/one//datastores/0/52/deployment.0  
Tue Mar 1 09:48:01 2016 [VMM][I]: ExitCode: 255  
Tue Mar 1 09:48:01 2016 [VMM][I]: Failed to execute virtualization driver operation: deploy.  
Tue Mar 1 09:48:01 2016 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/52/deployment.0  
Tue Mar 1 09:48:02 2016 [DiM][I]: New VM state is FAILED`

> One thing that I noticed is that, while VM creation is in prolog state and disk0 and disk1 are being made at /var/lib/one/datastores/0/vmname/, the failed VM’s are getting uid and gid = 99(i.e. nobody).  
> I think that’s what causing it to fail, as for the case of successful one, its’s uid and gid is first oneadmin then qemu.  
> Either that or that error in the log messages that says address already in use.

I have checked all the file permissions (actually gave all the files in /var/lib/one/, “u+rwx” permission).  
And libvirtd is running on worker node.

Thank you.

---

<div class="post-metadata">

**Author:** ![knawnd](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/knawnd/32/6119_2.png) [@knawnd](https://forum.opennebula.io/u/knawnd)\
**Post date:** [March 1, 2016, 6:18am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/2 "2016-03-01T06:18:00Z")

</div>

I would suggest to check VNC configuration in your VM template. Maybe “VNC troubleshooting” section in [that](http://docs.opennebula.org/4.14/administration/sunstone_gui/sunstone.html#configuration) guide will help you.

---

<div class="post-metadata">

**Author:** ![Amit\_Sharma](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Amit\_Sharma](https://forum.opennebula.io/u/Amit_Sharma)\
**Post date:** [March 1, 2016, 9:57am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/3 "2016-03-01T09:57:36Z")

</div>

Thanks a lot knawnd,  
I disabled the VNC and the VM’s created just fine. Will try to configure VNC later on, but for now, my system is up and running. Thanks. 🙂

---

<div class="post-metadata">

**Author:** ![knawnd](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/knawnd/32/6119_2.png) [@knawnd](https://forum.opennebula.io/u/knawnd)\
**Post date:** [March 1, 2016, 12:03pm UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/4 "2016-03-01T12:03:04Z")

</div>

Glad to help!

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [March 15, 2016, 10:33am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/5 "2016-03-15T10:33:18Z")

</div>

Just in case you haven’t already figured out, this is because two VMs using  
the same VNC port, review the GRAPHICS section of your templates, specially  
PORT.

> **···**
>
> On Mon, Feb 29, 2016 at 12:49 PM, Amit Sharma wrote:
> 
> > Amit\_Sharma [https://forum.opennebula.io/users/amit\_sharma](https://forum.opennebula.io/users/amit_sharma)  
> > February 29
> > 
> > Hello,  
> > I am setting up opennebula on two node cluster (One Head and one Worker  
> > node).  
> > I have completed all the installation and configuration part, but stuck at  
> > VM creation.  
> > My problem is that I am not able to create more then one VM. If I have one  
> > VM which is in running state, all the remaining will go to failed state.  
> > log file for that:
> > 
> > Tue Mar 1 09:45:28 2016 [DiM][I]: New VM state is ACTIVE.  
> > Tue Mar 1 09:45:28 2016 [LCM][I]: New VM state is PROLOG.  
> > Tue Mar 1 09:47:58 2016 [TM][I]: /usr/lib/ruby/1.8/open3.rb:73: warning:  
> > Insecure world writable dir /opt in PATH, mode 040777  
> > Tue Mar 1 09:47:58 2016 [TM][I]: clone: Cloning  
> > /var/lib/one/datastores/1/4d03488de689226edda6022fcd90c368 in  
> > c4:/var/lib/one//datastores/0/52/disk.0  
> > Tue Mar 1 09:47:58 2016 [TM][I]: ExitCode: 0  
> > Tue Mar 1 09:48:00 2016 [TM][I]: /usr/lib/ruby/1.8/open3.rb:73: warning:  
> > Insecure world writable dir /opt in PATH, mode 040777  
> > Tue Mar 1 09:48:00 2016 [TM][I]: context: Generating context block device  
> > at c4:/var/lib/one//datastores/0/52/disk.1  
> > Tue Mar 1 09:48:00 2016 [TM][I]: ExitCode: 0  
> > Tue Mar 1 09:48:00 2016 [LCM][I]: New VM state is BOOT  
> > Tue Mar 1 09:48:00 2016 [VMM][I]: Generating deployment file:  
> > /var/lib/one/v ms/52/de ployment.0  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: ExitCode: 0  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: Successfully execute network driver  
> > operation: pre.  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: Command execution fail: cat \<\< EOT |  
> > /var/tmp/one/vmm/kvm/deploy /var/lib/one//datastores/0/52/deployment.0 c4  
> > 52 c4  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: error: Failed to create domain from  
> > /var/lib/one//datastores/0/52/deployment.0  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: error: internal error process exited  
> > while connecting to monitor: 2016-02-29T11:12:51.599689Z kvm: Failed to  
> > start VNC server on127.0.0.1:-892’: socket bind failed: Address already  
> > in use  
> > Tue Mar 1 09:48:01 2016 [VMM][I]:  
> > Tue Mar 1 09:48:01 2016 [VMM][E]: Could not create domain from  
> > /var/lib/one//datastores/0/52/deployment.0  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: ExitCode: 255  
> > Tue Mar 1 09:48:01 2016 [VMM][I]: Failed to execute virtualization driver  
> > operation: deploy.  
> > Tue Mar 1 09:48:01 2016 [VMM][E]: Error deploying virtual machine: Could  
> > not create domain from /var/lib/one//datastores/0/52/deployment.0  
> > Tue Mar 1 09:48:02 2016 [DiM][I]: New VM state is FAILED`
> > 
> > One thing that I noticed is that, while VM creation is in prolog state and  
> > disk0 and disk1 are being made at /var/lib/one/datastores/0/vmname/, the  
> > failed VM’s are getting uid and gid = 99(i.e. nobody).  
> > I think that’s what causing it to fail, as for the case of successful one,  
> > its’s uid and gid is first oneadmin then qemu.  
> > Either that or that error in the log messages that says address already in  
> > use.
> > 
> > I have checked all the file permissions (actually gave all the files in  
> > /var/lib/one/, “u+rwx” permission).  
> > And libvirtd is running on worker node.
> > 
> > ## Thank you.
> > 
> > Visit Topic  
> > [https://forum.opennebula.io/t/not-able-to-create-a-vm-after-the-first-one/1868/1](https://forum.opennebula.io/t/not-able-to-create-a-vm-after-the-first-one/1868/1)  
> > or reply to this email to respond
> > 
> > To stop receiving notifications for this particular topic, click here  
> > [https://forum.opennebula.io/t/not-able-to-create-a-vm-after-the-first-one/1868/unsubscribe](https://forum.opennebula.io/t/not-able-to-create-a-vm-after-the-first-one/1868/unsubscribe).  
> > To unsubscribe from these emails, change your user preferences  
> > [https://forum.opennebula.io/my/preferences](https://forum.opennebula.io/my/preferences)
> 
> Ruben S. Montero, PhD  
> Project co-Lead and Chief Architect  
> OpenNebula - Flexible Enterprise Cloud Made Simple  
> [www.OpenNebula.org](http://www.OpenNebula.org) | [rsmontero@opennebula.org](mailto:rsmontero@opennebula.org) | @OpenNebula

---

<div class="post-metadata">

**Author:** ![Amit\_Sharma](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Amit\_Sharma](https://forum.opennebula.io/u/Amit_Sharma)\
**Post date:** [March 15, 2016, 11:37am UTC](https://forum.opennebula.io/t/resolved-not-able-to-create-a-more-then-one-vm-on-opennebula/1868/6 "2016-03-15T11:37:24Z")

</div>

Yes, I figured that out. That was the reason I was getting “Address already in use” error. Thanks any way Ruben. 🙂
