How to Setup CLI in Virtual Environment for Troubleshooting?

Problem

How to configure the OpenStack command-line client within a virtual environment to interact with an OpenStack cloud.

Environment

  • Private Cloud Director Virtualization

  • Self-Hosted Private Cloud Director Virtualization

Procedure

  1. Create a Virtual Environment (This command creates a new Python virtual environment named openstack-venv in your home directory):

$ sudo python3 -m venv ~/openstack-venv
  1. Activate the Virtual Environment:

$ source ~/openstack-venv/bin/activate
  1. Install OpenStack Client:

$ sudo pip install python-openstackclient
  1. Verify OpenStack client by running the command:

$ openstack --help

Last updated