VMware plugin : Cannot connect to error

198 views
Skip to first unread message

jeffrey...@accenture.com

unread,
Apr 1, 2016, 6:28:53 AM4/1/16
to bareos-users
Hi,


I am deploying a Bareos backup server.

But I have an error with the VMware plugin.

If I will like to make a backup of a VM, I always get the error "Cannot connect to [Vcenter server] with user [USER] and password.

I have look it up, but don't find anything to solve this problem.

I use Bareos version 15.2.2 and the vSphere server 5.5 standard edition.

The file daemon is installed on the Bareos server itself (normally connect to the vcenter with the plugin).

And the Data Protection API is enabled.

Stephan Dühr

unread,
Apr 1, 2016, 6:47:40 AM4/1/16
to bareos...@googlegroups.com
Hi,


On 04/01/2016 12:28 PM, jeffrey...@accenture.com wrote:
> Hi,
>
>
> I am deploying a Bareos backup server.
>
> But I have an error with the VMware plugin.
>
>
> If I will like to make a backup of a VM, I always get the error "Cannot connect to [Vcenter server] with user [USER] and password.

Where does this error message appear?
Please also check if /var/log/bareos/bareos.log has error messages.

>
> I have look it up, but don't find anything to solve this problem.

You could try to run the vmware_cbt_tool.py as described at
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#VMwarePlugin

with the --info option, for example

wmware_cbt_tool.py −s vcenter.example.org −u bak...@vsphere.local −p Bak.Adm−1234 −d mydc1 −f /webservers −v websrv1 −−info

What output do you get?

>
>
>
> I use Bareos version 15.2.2 and the vSphere server 5.5 standard edition.
>
> The file daemon is installed on the Bareos server itself (normally connect to the vcenter with the plugin).
>
> And the Data Protection API is enabled.
>

Regards
--
Stephan Dühr stepha...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-90
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: S. Dühr, M. Außendorf,
J. Steffens, Philipp Storz, M. v. Wieringen
Message has been deleted
Message has been deleted

jeffrey...@accenture.com

unread,
Apr 11, 2016, 8:18:29 AM4/11/16
to bareos-users
I have found the problem with the connection of the vcenter.
The vcenter have an unverified ssl certificate.
If you connect with pyvmomi to the vcenter, then you will get an warning of this unverified certificate.

I have fix the problem with adding some code in the function connect_vmware, from the BareosFdPluginVMware.py
Try :
import ssl

context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # add this
context.verify_mode = ssl.CERT_NONE # add this

self.si = SmartConnect(host=self.options['vcserver'],
user=self.options['vcuser'],
pwd=self.options['vcpass'],
port=443, sslContext=context) # add the sslContext

This will ignore the unverified certified.

Stephan Dühr

unread,
May 30, 2016, 6:56:00 AM5/30/16
to bareos...@googlegroups.com
Hi,

the sslContext option for SmartConnect has only been added in pyvmomi
after version 5.5.0.2014.1.1, compare the following:
https://github.com/vmware/pyvmomi/blob/v5.5.0.2014.1.1/pyVim/connect.py
and
https://github.com/vmware/pyvmomi/blob/master/pyVim/connect.py

The Bareos project relies either on the pyvmomi package from EPEL (v. 5.5.0.2014.1.1)
or provides pyvmomi 5.5.0.2014.1.1 for SLES 11 and SLES 12.
Debian 8 also has version 5.5.0-2014.1.1 pyvmomi packages.

So generally adding this option would break all normal installations.

Which version of pyvmomi are you using?
And which Linux distribution?

Regards,

Stephan
Reply all
Reply to author
Forward
0 new messages