Dmitry
(Dmitry Lyeypi)
May 15, 2015, 5:06pm
1
I deployed OpenNebula 4.12.1
I followed documentation re: VMware driver and:
configured ESXi hosts
VMware driver in OpenNebula
add ESXi hosts into OpenNebula.
import VMware template
When I try to deploy VM from VMware template I get error below:
Fri May 15 12:01:33 2015 [Z0][VMM][I]: Command execution fail: /var/lib/one/remotes/vmm/vmware/deploy ‘/var/lib/one/vms/139/deployment.0’ ‘labesxc2b2’ 139 labesxc2b2
Fri May 15 12:01:33 2015 [Z0][VMM][E]: deploy: Error executing: virsh -c ‘esx://labesxc2b2/?no_verify=1&auto_answer=1’ define /var/lib/one/vms/139/deployment.0 err: /usr/bin/tty_expect: invalid option – 'c’
Fri May 15 12:01:33 2015 [Z0][VMM][I]: Wrong option. Check usage
Fri May 15 12:01:33 2015 [Z0][VMM][I]: myexpect [-h] <-p password> <-u username>
Fri May 15 12:01:33 2015 [Z0][VMM][I]: SYNOPSIS
Fri May 15 12:01:33 2015 [Z0][VMM][I]: Wraps the execution of a command and sends username & password
Fri May 15 12:01:33 2015 [Z0][VMM][I]: OPTIONS
Fri May 15 12:01:33 2015 [Z0][VMM][I]: -h prints this help.
Fri May 15 12:01:33 2015 [Z0][VMM][I]: -p the password
Fri May 15 12:01:33 2015 [Z0][VMM][I]: -u the username
Fri May 15 12:01:33 2015 [Z0][VMM][I]: complete virsh command
Fri May 15 12:01:33 2015 [Z0][VMM][I]: ExitCode: 255
Fri May 15 12:01:33 2015 [Z0][VMM][I]: out:
Fri May 15 12:01:33 2015 [Z0][VMM][I]: ExitCode: 255
Fri May 15 12:01:33 2015 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Fri May 15 12:01:33 2015 [Z0][VMM][E]: Error deploying virtual machine
Fri May 15 12:01:33 2015 [Z0][DiM][I]: New VM state is FAILED
I can connect to ESXi hosts from virsh on front-end
virsh -c esx://labesxc2b2
What did I miss in configuration?
1 Like
tinova
(Tino Vázquez)
May 18, 2015, 12:30pm
2
Have you set the username and password for the ESX user in /etc/one/vmwarerc?
Also, please note that step 4. import VMware template is not supported in the ESX drivers but rather in the vCenter drivers.
Dmitry
(Dmitry Lyeypi)
May 19, 2015, 12:46pm
3
Yes, username and password for the ESX user set in /etc/one/vmwarerc
I am using the same ESX credentials when using virsh
virsh -c esx://labesxc2b2/?no_verify=1
tinova
(Tino Vázquez)
May 19, 2015, 2:20pm
5
What OS are you using for the front-end?
Please try executing the following command:
tty_expect -u {user} -p {pass} virsh -c esx://labesxc2b2/?no_verify=1 list
where user and pass are the ESX credentials
Dmitry
(Dmitry Lyeypi)
May 19, 2015, 2:29pm
6
I get the following
oneadmin@opennebula01:~$ tty_expect -u oneadmin -p ‘myPassword’ virsh -c esx://labesxc2b2/?no_verify=1 list
Id Name State
Dmitry
(Dmitry Lyeypi)
May 19, 2015, 2:35pm
7
I use Ubuntu 14.04 for front-end
tinova
(Tino Vázquez)
May 20, 2015, 9:07am
8
Could you share the vmwarerc file (removing the password)?
Dmitry
(Dmitry Lyeypi)
May 20, 2015, 12:37pm
9
Hi Tino,
Here is vmwarerc file:
# Libvirt congfiguration
:libvirt_uri: “‘esx://@HOST @/?no_verify=1&auto_answer=1’”
# Username and password of the VMware hypervisor
:username: “oneadmin”
:password: “myPassword”
# VMotion configuration attributes
:datacenter: “OpenNebula”
:vcenter: “192.168.xx.xx”
# true to instruct ESX to create vswp files with disk reservation
# for memory, false for the vice versa
:reserve_memory_in_disk: true
Regards,
Dmitry
Dmitry
(Dmitry Lyeypi)
May 20, 2015, 6:06pm
10
Figured this one out.
It was oneadmin password, it has some special character that I guess libvirt could not parse.
I changed password on ESX hosts and in vmwarerc file and was able to instantiate VM.
Thank you for your help.
Dmitry
(Dmitry Lyeypi)
May 20, 2015, 7:52pm
11
Thank you Juan for your link.
It was very helpful.
You’re welcome
I already installed some machines in a ESx enviroment, if you need help with this you can ask me.
regards