Installing the virtctl client

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

Installing the virtctl client on Linux, Windows, and macOS

Download and install the virtctl client for your operating system.

Procedure

  1. Navigate to Virtualization > Overview in the OKD web console.

  2. Click the Download virtctl link on the upper right corner of the page and download the virtctl client for your operating system.

  3. Install virtctl:

    • For Linux:

      1. Decompress the archive file:

        1. $ tar -xvf <virtctl-version-distribution.arch>.tar.gz
      2. Run the following command to make the virtctl binary executable:

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

        You can check your path by running the following command:

        1. $ echo $PATH
      4. Set the KUBECONFIG environment variable:

        1. $ export KUBECONFIG=/home/<user>/clusters/current/auth/kubeconfig
    • For Windows:

      1. Decompress the archive file.

      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.

        You can check your path by running the following command:

        1. C:\> path
    • For macOS:

      1. Decompress the archive file.

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

        You can check your path by running the following command:

        1. echo $PATH

Installing the virtctl as an RPM

You can install the virtctl client on Fedora as an RPM after enabling the OKD Virtualization repository.

Enabling OKD Virtualization repositories

Enable the OKD Virtualization repository for your version of Fedora.

Prerequisites

  • Your system is registered to a Red Hat account with an active subscription to the “Red Hat Container Native Virtualization” entitlement.

Procedure

  • Enable the appropriate OKD Virtualization repository for your operating system by using the subscription-manager CLI tool.

    • To enable the repository for Fedora 9, run:

      1. # subscription-manager repos --enable cnv-4.13-for-rhel-9-x86_64-rpms
    • To enable the repository for Fedora 8, run:

      1. # subscription-manager repos --enable cnv-4.13-for-rhel-8-x86_64-rpms

Installing the virtctl client using the yum utility

Install the virtctl client from the kubevirt-virtctl package.

Prerequisites

  • You enabled an OKD Virtualization repository on your Fedora system.

Procedure

  • Install the kubevirt-virtctl package:

    1. # yum install kubevirt-virtctl

Additional resources