vcd-cli icon indicating copy to clipboard operation
vcd-cli copied to clipboard

vcd-cli for windows with no internet access

Open pepehonguito01 opened this issue 7 years ago • 4 comments

Hi guys, I'm new using the tools and I'm experiencing issues trying to install vcd-cli on a windows 2012 server with no internet access. It has installed the latest version of python and when we attempt to install vcd-cli we receive the following error (the complete folder was downloaded to the server, and seems it's trying to connect to internet anyways) Collecting vcd-cli Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio n failed: 403 Forbidden',))': /simple/vcd-cli/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio n failed: 403 Forbidden',))': /simple/vcd-cli/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio n failed: 403 Forbidden',))': /simple/vcd-cli/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connec tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio n failed: 403 Forbidden',))': /simple/vcd-cli/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connec tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio n failed: 403 Forbidden',))': /simple/vcd-cli/ Could not find a version that satisfies the requirement vcd-cli (from versions : ) No matching distribution found for vcd-cli

pepehonguito01 avatar Apr 05 '18 23:04 pepehonguito01

Hello @pepehonguito01!

Can you show the command(s) you were trying to execute when this error occurred?

Also, how did you install Python? (Is it the Windows installer from Python.org?)

Generally speaking you are going to have to pull code off the Internet to get installation to work, since vcd-cli has Python dependencies like pyvcloud that you won't have in a standard Python distribution. I'll be able to provide more advice once I see answers to the questions posed above.

Cheers, Robert

hodgesrm avatar Apr 06 '18 00:04 hodgesrm

Thanks Robert for your prompt response. Python installer was downloaded from python.org (package name: Windows x86-64 executable installer) Command when the error occurs: C:\Users\Administrator>pip3 install --user vcd-cli Thanks

pepehonguito01 avatar Apr 06 '18 00:04 pepehonguito01

OK, I think this may be a bit tricky. Basically you're going to have problems because you'll need internet access not only to get vcd-cli but also all of its dependencies, which includes modules like pyvcloud, pycryptodome, click, and others.

One solution is to download vcd-cli dependencies using another host. Have a look at the following stackoverflow.com article: https://stackoverflow.com/questions/36725843/installing-python-packages-without-internet-and-using-source-code-as-tar-gz-and. It describes a couple of paths but basically the idea is to download first to a host that can see the internet, then move the files to your isolated host and install there.

Depending on your comfort level with Docker another solution is to build a docker image on a host that can see the internet and then pull the image back to your isolated host. Here's a set of steps to get it done.

Step 1: create a Dockerfile with the following contents:

$ more Dockerfile 
FROM python:3.6
RUN pip3 install --upgrade pip
RUN pip3 install vcd-cli

Step 2: Build the image with 'docker build -t python-vcd-cli-3.6 .'

Step 3: Save the image and reload on the isolated host. (See http://www.techietown.info/2017/02/copy-docker-images-another-host/ for ideas.)

Step 4: Run the image interactively.

docker run -it python-vcd-cli-3.6 bash
root@0e797356f428:/# vcd version
vcd-cli, VMware vCloud Director Command Line Interface, 20.2.0
root@0e797356f428:/# exit

Let me know if one of these solutions helps you.

Cheers, Robert

hodgesrm avatar Apr 06 '18 01:04 hodgesrm

p.s., Sorry that these are not windows examples but something similar should work on Windows.

hodgesrm avatar Apr 06 '18 01:04 hodgesrm