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

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.

I would suggest to check VNC configuration in your VM template. Maybe “VNC troubleshooting” section in that guide will help you.

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. :slightly_smiling:

Glad to help!

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
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
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.
To unsubscribe from these emails, change your user 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 | rsmontero@opennebula.org | @OpenNebula

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