Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

2016-03-31

python : disabling SSL verification on pyvmomi on python


  • self signed certificate ? 
  • RHEL6 ? python 2.6 and 2.7.10 mixed environment ?
  • pyvmomi 5.5+ ?

Looking for a quick fix ?
...
File "/usr/lib/python2.6/site-packages/requests/adapters.py", line 447, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:492: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

[root@fb7a3cd8c69d ~]# vim my_script.pyt
...
    context = None
    try:
        # Disabling SSL certificate verification       
        context = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
        context.verify_mode = ssl.CERT_NONE
    except AttributeError:
        rget = requests.get
        requests.get = lambda obj, *args,**kwargs: rget(obj,verify=False)
        requests.packages.urllib3.disable_warnings()

    si = SmartConnect(host=args.host,
            user=user,
            pwd=args.password,
            port=int(args.port), sslContext=context)


And you are good to go. This will resolve the issue, and allow you to focus on your life

PS: You would still need to fix this to use basic auth.

2008-11-21

Linux Hosts That Use the evdev Driver for Keyboards Do Not Map Keys Correctly in Any Guest in VMware

Some of the newest Linux distributions use Xorg 1.4, and the new evdev driver manages all devices, including keyboards. The evdev driver causes the keyboard to send different key codes. For example, the down arrow is key code 116, which other drivers understand to be Win+R. Consequently, keyboard mapping problems occur in all guest operating systems.

Solution - http://kb.vmware.com/selfservice/viewContent.do?externalId=1007439&sliceId=1

GitLab runner on Windows with bash shell on windows contianer on Docker

As part of your pipeline, you may need to perform browser testing across different platforms/environments. To minimize testing time, it'...