Container Service Extension 3.1.1 was released a few days back with new enhancements. The release announcements were made here and here.
Although the deployment procedure hasn’t changed much, mine was not smooth and I faced a couple of hiccups. This blog post discusses the problem I experienced and how I resolved it.
After installing VCD-CLI using pip, I was unable to execute any VCD command. The command was throwing an error as shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[root@cse ~]# vcd version Traceback (most recent call last): File "/root/.local/lib/python3.7/site-packages/vcd_cli/browsercookie/__init__.py", line 18, in <module> from pysqlite2 import dbapi2 as sqlite3 ModuleNotFoundError: No module named 'pysqlite2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/.local/bin/vcd", line 5, in <module> from vcd_cli.vcd import vcd File "/root/.local/lib/python3.7/site-packages/vcd_cli/vcd.py", line 121, in <module> from vcd_cli import login # NOQA File "/root/.local/lib/python3.7/site-packages/vcd_cli/login.py", line 24, in <module> from vcd_cli import browsercookie File "/root/.local/lib/python3.7/site-packages/vcd_cli/browsercookie/__init__.py", line 20, in <module> import sqlite3 File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ModuleNotFoundError: No module named '_sqlite3' |
On further investigation, I found that the Python installation is missing module ‘sqlite’. A similar issue is described on stackoverflow
I have installed Python 3.7.12 on CentOS 7 VM and executed the following steps to fix the issue.
Step 1: Install sqlite-devel package
1 |
[root@cse ~]# yum install sqlite-devel -y |
Step 2: Reconfigure Python to load sqlite module.
Navigate to the directory where you have extracted Python installation binaries and run the below command:
1 |
[root@cse ~]# ./configure --enable-loadable-sqlite-extensions && make altinstall |
After the Python reconciliation was complete, I ran the vcd command again, and it worked flawlessly.
1 2 3 |
[root@cse ~]# vcd version vcd-cli, VMware vCloud Director Command Line Interface, 24.0.1 |
I hope this post will save some time for the readers who are facing similar issues with their deployment.
Feel free to share this post on social media if it is worth sharing.