[one-users] Asking about VMWARE ESX and OpenNebula

Tino Vazquez tinova at opennebula.org
Wed Apr 27 02:58:22 PDT 2011


Deawr Hong,

Yes, you have to set in USERNAME and PASSWORD valid credentials to
access the ESX hypervisor.

Regards,

-Tino

--
Constantino Vázquez Blanco, MSc
OpenNebula Major Contributor
www.OpenNebula.org | @tinova79



On Wed, Apr 27, 2011 at 11:53 AM, Hoang Dinh Phuc <hdphuc at gmail.com> wrote:
> Hi Tino,
>
> Here is the content of $ONE_LCATION/etc/vmwarerc
>
>
> LIBVIRT_URI   = "esx://@HOST@/?no_verify=1"
> QEMU_PROTOCOL = "qemu"
>
> # Username and password of the VMware hypervisor
> USERNAME      = "oneadmin"
> PASSWORD      = ""
>
> # Loading the vmware library for mads
> # Please leave this uncommented
> load ENV['ONE_LOCATION'] + "/lib/ruby/vmwarelib.rb"
>
> ENV['LANG']='C'
>
> Do i have to change any information?
> Regards
>
> On 27 April 2011 16:50, Tino Vazquez <tinova at opennebula.org> wrote:
>>
>> Dear Hoang,
>>
>> You need to set the ESX user credentials in $ONE_LOCATION/etc/vmwarerc.
>>
>> Regards,
>>
>> -Tino
>>
>> --
>> Constantino Vázquez Blanco, MSc
>> OpenNebula Major Contributor
>> www.OpenNebula.org | @tinova79
>>
>>
>>
>> On Wed, Apr 27, 2011 at 3:05 AM, Hoang Dinh Phuc <hdphuc at gmail.com> wrote:
>> > Hi Tino Vazquez,
>> >
>> > here is the output of tree structure of $ONE_LOCATION/var:
>> > $ tree $ONE_LOCATION/var
>> > |-- config
>> > |-- images
>> > |   |-- 28c86878bdc6af8c34dd94efcf31c15ee6eeb2a1
>> > |   |-- 567196a1f80db4234d62b83bc6a0b80d0fa99824
>> > |   `-- 8625d68b699fd30e64360471eb2c38fed47fcfb6
>> > |-- one_xmlrpc.01.log
>> > |-- one_xmlrpc.log
>> > |-- oned.01.log
>> > |-- oned.log
>> > |-- oned.pid
>> > |-- remotes
>> > |   |-- im
>> > |   |   |-- ganglia.d
>> > |   |   |   `-- ganglia_probe
>> > |   |   |-- kvm.d
>> > |   |   |   |-- architecture.sh
>> > |   |   |   |-- cpu.sh
>> > |   |   |   |-- kvm.rb
>> > |   |   |   `-- name.sh
>> > |   |   |-- run_probes
>> > |   |   |-- vmware.d
>> > |   |   |   `-- vmware.rb
>> > |   |   `-- xen.d
>> > |   |       |-- architecture.sh
>> > |   |       |-- cpu.sh
>> > |   |       |-- name.sh
>> > |   |       `-- xen.rb
>> > |   `-- vmm
>> > |       |-- kvm
>> > |       |   |-- cancel
>> > |       |   |-- deploy
>> > |       |   |-- kvmrc
>> > |       |   |-- migrate
>> > |       |   |-- poll
>> > |       |   |-- poll_local
>> > |       |   |-- restore
>> > |       |   |-- save
>> > |       |   `-- shutdown
>> > |       |-- vmware
>> > |       |   |-- cancel
>> > |       |   |-- checkpoint
>> > |       |   |-- deploy
>> > |       |   |-- migrate
>> > |       |   |-- poll
>> > |       |   |-- restore
>> > |       |   |-- save
>> > |       |   `-- shutdown
>> > |       `-- xen
>> > |           |-- cancel
>> > |           |-- deploy
>> > |           |-- migrate
>> > |           |-- poll
>> > |           |-- poll_local
>> > |           |-- restore
>> > |           |-- save
>> > |           |-- shutdown
>> > |           `-- xenrc
>> > |-- sched.log
>> > |-- sched.pid
>> > `-- sunstone.log
>> >
>> > and here is the next log
>> >
>> > $ONE_LOCATION/lib/mads/one_im_sh vmware
>> > INIT
>> > INIT SUCCESS - -
>> > MONITOR 0 esxsrv -
>> > LOG - 0 Command execution fail:
>> > /srv/cloud/one/var/remotes//im/run_probes
>> > vmware esxsrv
>> > LOG - 0 STDERR follows.
>> > LOG - 0 /srv/cloud/one/lib/ruby/vmwarelib.rb:26: warning: already
>> > initialized constant ONE_LOCATION
>> > LOG - 0 /srv/cloud/one/lib/ruby/vmwarelib.rb:32: warning: already
>> > initialized constant RUBY_LIB_LOCATION
>> > LOG - 0 [VMWARE] cmd failed [/srv/cloud/one/bin/tty_expect -u oneadmin
>> > -p
>> > virsh -c esx://esxsrv/?no_verify=1 --readonly nodeinfo]. Stderr: .
>> > Stdout:
>> > /srv/cloud/one/bin/tty_expect: invalid option -- c
>> > LOG - 0 Wrong option. Check usage
>> > LOG - 0
>> > LOG - 0 myexpect [-h] <-p password> <-u username> <command>
>> > LOG - 0
>> > LOG - 0 SYNOPSIS
>> > LOG - 0 Wraps the execution of a command and sends username & password
>> > LOG - 0
>> > LOG - 0 OPTIONS
>> > LOG - 0 -h    prints this help.
>> > LOG - 0 -p    the password
>> > LOG - 0 -u    the username
>> > LOG - 0 <virsh command>    complete virsh command
>> > LOG - 0 ExitCode: 255
>> > LOG - 0 ./vmware.rb:65: private method `split' called for 255:Fixnum
>> > (NoMethodError)
>> > LOG - 0 Error executing vmware.rb
>> > LOG - 0 ExitCode: 1
>> > MONITOR FAILURE 0 Could not monitor host esxsrv.
>> >
>> >
>> > Regards
>> >
>> > On 26 April 2011 23:16, Tino Vazquez <tinova at opennebula.org> wrote:
>> >>
>> >> Hi,
>> >>
>> >> The commands should work without modification (note that they should
>> >> be run from inside the vmware addon installation folder), although
>> >> your modification should also work.
>> >>
>> >> Could you send the output of
>> >>
>> >> --
>> >> $ tree $ONE_LOCATION/var
>> >> --
>> >>
>> >> and
>> >>
>> >> --
>> >> $ $ONE_LOCATION/lib/mads/one_im_sh vmware
>> >> INIT
>> >> MONITOR 0 <esx-hostname> -
>> >> --
>> >>
>> >> Regards,
>> >>
>> >> -Tino
>> >>
>> >> --
>> >> Constantino Vázquez Blanco, MSc
>> >> OpenNebula Major Contributor
>> >> www.OpenNebula.org | @tinova79
>> >>
>> >>
>> >>
>> >> On Tue, Apr 26, 2011 at 6:09 PM, Hoang Dinh Phuc <hdphuc at gmail.com>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > Is any mistake in your command? I've change the path like this:
>> >> >
>> >> > $ mkdir -p $ONE_LOCATION/var/remotes/im/vmware.d && cp -r
>> >> > $ONE_LOCATION/lib/remotes/im/vmware.d/*
>> >> > $ONE_LOCATION/var/remotes/im/vmware.d
>> >> >
>> >> > and
>> >> >
>> >> > $ mkdir -p $ONE_LOCATION/var/remotes/vmm/vmware && cp -r
>> >> > $ONE_LOCATION/lib/remotes/vmm/vmware/*
>> >> > $ONE_LOCATION/var/remotes/vmm/vmware
>> >> >
>> >> > But it still get the error.
>> >> >
>> >> > Regards
>> >> >
>> >> > On 26 April 2011 22:20, Tino Vazquez <tinova at opennebula.org> wrote:
>> >> >>
>> >> >> Dear Hoang,
>> >> >>
>> >> >> My apologies, the test i was asking for was not complete (it was
>> >> >> lacking a paramenter to the mad).
>> >> >>
>> >> >> In any case, I think the problem may be in the way ONE 2.0+ handles
>> >> >> the remotes. The VMware Addon only copies to
>> >> >> $ONE_LOCATION/lib/remotes, when it should copy also to
>> >> >> $ONE_LOCATION/var. I've opened a ticket [1] to keep track of the
>> >> >> solution.
>> >> >>
>> >> >> Meanwhile, a workaround is to issue the following from the VMware
>> >> >> Addon installation directory:
>> >> >>
>> >> >> $ mkdir -p $ONE_LOCATION/var/remotes/im/vmware.d && cp -r
>> >> >> im/remotes/*
>> >> >> $ONE_LOCATION/var/remotes/im/vmware.d
>> >> >> $ mkdir -p $ONE_LOCATION/var/remotes/vmm/vmware && cp -r
>> >> >> vmm/remotes/*
>> >> >> $ONE_LOCATION/var/remotes/vmm/vmware
>> >> >>
>> >> >> Please let me know if this solves the issue.
>> >> >>
>> >> >> Regards,
>> >> >>
>> >> >> -Tino
>> >> >>
>> >> >> [1] http://dev.opennebula.org/issues/593
>> >> >>
>> >> >> --
>> >> >> Constantino Vázquez Blanco, MSc
>> >> >> OpenNebula Major Contributor
>> >> >> www.OpenNebula.org | @tinova79
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Tue, Apr 26, 2011 at 12:13 PM, Hoang Dinh Phuc <hdphuc at gmail.com>
>> >> >> wrote:
>> >> >> > Hi
>> >> >> >
>> >> >> > Here is the output:
>> >> >> >
>> >> >> > $ ruby -dw $ONE_LOCATION/lib/mads/one_im_sh.rb
>> >> >> > --
>> >> >> > INIT
>> >> >> > --INIT SUCCESS - -
>> >> >> > --
>> >> >> > MONITOR 0 esxsrv
>> >> >> > Exception `Interrupt' at
>> >> >> > /srv/cloud/one/lib/ruby/ActionManager.rb:168
>> >> >> > -
>> >> >> > /srv/cloud/one/lib/ruby/ActionManager.rb:168:in `wait': Interrupt
>> >> >> >     from /srv/cloud/one/lib/ruby/ActionManager.rb:168:in
>> >> >> > `start_listener'
>> >> >> >     from /srv/cloud/one/lib/ruby/ActionManager.rb:166:in
>> >> >> > `synchronize'
>> >> >> >     from /srv/cloud/one/lib/ruby/ActionManager.rb:166:in
>> >> >> > `start_listener'
>> >> >> >     from /srv/cloud/one/lib/ruby/OpenNebulaDriver.rb:73:in
>> >> >> > `start_driver'
>> >> >> >     from /srv/cloud/one/lib/mads/one_im_sh.rb:85
>> >> >> >
>> >> >> > It can't connect to my ESX Server. Please show me the way to check
>> >> >> > the
>> >> >> > problems.
>> >> >> >
>> >> >> > Thanks & Regards
>> >> >> >
>> >> >> > On 26 April 2011 16:55, Tino Vazquez <tinova at opennebula.org>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> Yes please input the following two lines:
>> >> >> >>
>> >> >> >> --
>> >> >> >> INIT
>> >> >> >> --
>> >> >> >>
>> >> >> >> The answer should be
>> >> >> >>
>> >> >> >> --
>> >> >> >> INIT SUCCESS
>> >> >> >> --
>> >> >> >>
>> >> >> >> and the also enter the following
>> >> >> >>
>> >> >> >> --
>> >> >> >> MONITOR 0 <name_of_host> -
>> >> >> >> --
>> >> >> >>
>> >> >> >> and send the output.
>> >> >> >>
>> >> >> >> Regards,
>> >> >> >>
>> >> >> >> -Tino
>> >> >> >>
>> >> >> >> --
>> >> >> >> Constantino Vázquez Blanco, MSc
>> >> >> >> OpenNebula Major Contributor
>> >> >> >> www.OpenNebula.org | @tinova79
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> On Tue, Apr 26, 2011 at 3:33 AM, Hoang Dinh Phuc
>> >> >> >> <hdphuc at gmail.com>
>> >> >> >> wrote:
>> >> >> >> > Hi Tino Vazquez,
>> >> >> >> >
>> >> >> >> > I've ran the command
>> >> >> >> >
>> >> >> >> > $ ruby -dw $ONE_LOCATION/lib/mads/one_im_sh.rb
>> >> >> >> >
>> >> >> >> > But it don't return anything. Do i have to do anything?
>> >> >> >> >
>> >> >> >> > Thanks
>> >> >> >> >
>> >> >> >> > On 25 April 2011 21:19, Tino Vazquez <tinova at opennebula.org>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> Let's see what happens if the driver is executed by hand,
>> >> >> >> >> please
>> >> >> >> >> send
>> >> >> >> >> the output of:
>> >> >> >> >>
>> >> >> >> >> $ ruby -dw $ONE_LOCATION/lib/mads/one_im_sh.rb
>> >> >> >> >> INIT
>> >> >> >> >> MONITOR 0 <name_of_host> -
>> >> >> >> >>
>> >> >> >> >> Regards,
>> >> >> >> >>
>> >> >> >> >> -Tino
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Constantino Vázquez Blanco, MSc
>> >> >> >> >> OpenNebula Major Contributor
>> >> >> >> >> www.OpenNebula.org | @tinova79
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> On Tue, Apr 19, 2011 at 2:50 AM, Hoang Dinh Phuc
>> >> >> >> >> <hdphuc at gmail.com>
>> >> >> >> >> wrote:
>> >> >> >> >> >
>> >> >> >> >> > Hello all,
>> >> >> >> >> >
>> >> >> >> >> >  I've already installed OpenNebula 2.2 on CentOS and add KVM
>> >> >> >> >> > host
>> >> >> >> >> > to
>> >> >> >> >> > OpenNebula. Now, i want to add ESX Server (VMWARE) to be
>> >> >> >> >> > managed
>> >> >> >> >> > by
>> >> >> >> >> > the
>> >> >> >> >> > OpenNebula. But it make an error. Here is my oned.conf:
>> >> >> >> >> >
>> >> >> >> >> > VM_MAD = [
>> >> >> >> >> >     name       = "vmm_vmware",
>> >> >> >> >> >     executable = "one_vmm_sh",
>> >> >> >> >> >     arguments  = "vmware",
>> >> >> >> >> >     default    = "vmm_sh/vmm_sh_vmware.conf",
>> >> >> >> >> >     type       = "vmware" ]
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > #-------------------------------------------------------------------------------
>> >> >> >> >> > #  VMware Driver Addon Information Driver Manager
>> >> >> >> >> > Configuration
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > #-------------------------------------------------------------------------------
>> >> >> >> >> > IM_MAD = [
>> >> >> >> >> >       name       = "im_vmware",
>> >> >> >> >> >       executable = "one_im_sh",
>> >> >> >> >> >       arguments  = "vmware" ]
>> >> >> >> >> > #       arguments = "--username oneadmin --password ' ' " ]
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > #-------------------------------------------------------------------------------
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > #-------------------------------------------------------------------------------
>> >> >> >> >> > # VMware Driver Addon Transfer Manager Driver Configuration
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > #-------------------------------------------------------------------------------
>> >> >> >> >> > TM_MAD = [
>> >> >> >> >> >     name       = "tm_vmware",
>> >> >> >> >> >     executable = "one_tm",
>> >> >> >> >> >     arguments  = "tm_vmware/tm_vmware.conf" ]
>> >> >> >> >> >
>> >> >> >> >> > When i'm using onehost command to add VMWARE Host, it make
>> >> >> >> >> > an
>> >> >> >> >> > error
>> >> >> >> >> > state.
>> >> >> >> >> > And here is the log
>> >> >> >> >> > $ onehost esxsrv im_vmware vmm_vmware tm_vmware
>> >> >> >> >> >
>> >> >> >> >> > Mon Apr 18 14:24:05 2011 [InM][I]: Monitoring host esxsrv
>> >> >> >> >> > (3)
>> >> >> >> >> > Mon Apr 18 14:24:05 2011 [ReM][D]: VirtualMachinePoolInfo
>> >> >> >> >> > method
>> >> >> >> >> > invoked
>> >> >> >> >> > Mon Apr 18 14:24:05 2011 [InM][D]: Host 3 successfully
>> >> >> >> >> > monitored.
>> >> >> >> >> > Mon Apr 18 14:24:05 2011 [ONE][E]: syntax error, unexpected
>> >> >> >> >> > $end,
>> >> >> >> >> > expecting
>> >> >> >> >> > VARIABLE at line 2, columns 1:2
>> >> >> >> >> > Mon Apr 18 14:24:05 2011 [InM][E]: Error parsing host
>> >> >> >> >> > information:
>> >> >> >> >> >
>> >> >> >> >> > Please show me the way to add VMWARE host to OpenNebula.
>> >> >> >> >> >
>> >> >> >> >> > Thanks so much.
>> >> >> >> >> > -------------------
>> >> >> >> >> > F:  Hoang Dinh Phuc
>> >> >> >> >> > E:  hdphuc at gmail.com
>> >> >> >> >> > M: +84909398700
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > --
>> >> >> >> >> > -------------------
>> >> >> >> >> > F:  Hoang Dinh Phuc
>> >> >> >> >> > E:  hdphuc at gmail.com
>> >> >> >> >> > M: +84909398700
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > _______________________________________________
>> >> >> >> >> > Users mailing list
>> >> >> >> >> > Users at lists.opennebula.org
>> >> >> >> >> >
>> >> >> >> >> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > -------------------
>> >> >> >> > F:  Hoang Dinh Phuc
>> >> >> >> > E:  hdphuc at gmail.com
>> >> >> >> > M: +84909398700
>> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > -------------------
>> >> >> > F:  Hoang Dinh Phuc
>> >> >> > E:  hdphuc at gmail.com
>> >> >> > M: +84909398700
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > -------------------
>> >> > F:  Hoang Dinh Phuc
>> >> > E:  hdphuc at gmail.com
>> >> > M: +84909398700
>> >> >
>> >> >
>> >
>> >
>> >
>> > --
>> > -------------------
>> > F:  Hoang Dinh Phuc
>> > E:  hdphuc at gmail.com
>> > M: +84909398700
>> >
>> >
>
>
>
> --
> -------------------
> F:  Hoang Dinh Phuc
> E:  hdphuc at gmail.com
> M: +84909398700
>
>


More information about the Users mailing list