$ tar -xvf <virtctl-version-distribution.arch>.tar.gz
The virtctl
client is a command-line utility for managing OpenShift Virtualization
resources. It is available for Linux, macOS, and Windows distributions.
You can install the virtctl
client from the OpenShift Virtualization web console or by enabling the OpenShift Virtualization repository and installing the kubevirt-virtctl
package.
You can download the virtctl
client from the Red Hat Customer Portal, which is linked to in your OpenShift Virtualization web console in the Command Line Tools page.
You must have an activated OpenShift Container Platform subscription to access the download page on the Customer Portal.
Access the Customer Portal by clicking the icon, which is in the upper-right corner of the web console, and selecting Command Line Tools.
Ensure you have the appropriate version for your cluster selected from the Version: list.
Download the virtctl
client for your distribution. All downloads are in tar.gz
format.
Extract the tarball. The following CLI command extracts it into the same directory as the tarball and is applicable for all distributions:
$ tar -xvf <virtctl-version-distribution.arch>.tar.gz
For Linux and macOS:
Navigate the extracted folder hierachy and make the virtctl
binary executable:
$ chmod +x <virtctl-file-name>
Move the virtctl
binary to a directory on your PATH.
To check your path, run:
$ echo $PATH
For Windows users:
Navigate the extracted folder hierarchy and double-click the virtctl
executable file to install the client.
Red Hat offers OpenShift Virtualization repositories for both Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 7:
Red Hat Enterprise Linux 8 repository: cnv-2.5-for-rhel-8-x86_64-rpms
Red Hat Enterprise Linux 7 repository: rhel-7-server-cnv-2.5-rpms
The process for enabling the repository in subscription-manager
is the same
in both platforms.
Enable the appropriate OpenShift Virtualization repository for your system by running the following command:
# subscription-manager repos --enable <repository>
Install the virtctl
client from the kubevirt-virtctl
package.
Install the kubevirt-virtctl
package:
# yum install kubevirt-virtctl
Using the CLI tools for OpenShift Virtualization.