Enabling the virtctl client

The virtctl client is a command-line utility for managing OKD Virtualization resources. It is available for Linux, macOS, and Windows distributions.

Downloading and installing the virtctl client

Downloading the virtctl client

Download the virtctl client by using the link provided in the ConsoleCLIDownload custom resource (CR).

Procedure

  1. View the ConsoleCLIDownload object by running the following command:

    1. $ oc get ConsoleCLIDownload virtctl-clidownloads-kubevirt-hyperconverged -o yaml
  2. Download the virtctl client by using the link listed for your distribution.

Installing the virtctl client

Extract and install the virtctl client after downloading from the appropriate location for your operating system.

Prerequisites

  • You must have downloaded the virtctl client.

Procedure

  • For Linux:

    1. Extract the tarball. The following CLI command extracts it into the same directory as the tarball:

      1. $ tar -xvf <virtctl-version-distribution.arch>.tar.gz
    2. Navigate the extracted folder hierachy and run the following command to make the virtctl binary executable:

      1. $ chmod +x <virtctl-file-name>
    3. Move the virtctl binary to a directory in your PATH environment variable.

    4. To check your path, run the following command:

      1. $ echo $PATH
  • For Windows users:

    1. Unpack and unzip the archive.

    2. Navigate the extracted folder hierarchy and double-click the virtctl executable file to install the client.

    3. Move the virtctl binary to a directory in your PATH environment variable.

    4. To check your path, run the following command:

      1. C:\> path
  • For macOS users:

    1. Unpack and unzip the archive.

    2. Move the virtctl binary to a directory in your PATH environment variable.

    3. To check your path, run the following command:

      1. echo $PATH

Additional setup options

Installing the virtctl client using the yum utility

Install the virtctl client from the kubevirt-virtctl package.

Procedure

  • Install the kubevirt-virtctl package:

    1. # yum install kubevirt-virtctl

Enabling OKD Virtualization repositories

Red Hat offers OKD Virtualization repositories for both Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 7:

  • Red Hat Enterprise Linux 8 repository: cnv-4.9-for-rhel-8-x86_64-rpms

  • Red Hat Enterprise Linux 7 repository: rhel-7-server-cnv-4.9-rpms

The process for enabling the repository in subscription-manager is the same in both platforms.

Procedure

  • Enable the appropriate OKD Virtualization repository for your system by running the following command:

    1. # subscription-manager repos --enable <repository>

Additional resources

Using the CLI tools for OKD Virtualization.