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
View the
ConsoleCLIDownload
object by running the following command:$ oc get ConsoleCLIDownload virtctl-clidownloads-kubevirt-hyperconverged -o yaml
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:
Extract the tarball. The following CLI command extracts it into the same directory as the tarball:
$ tar -xvf <virtctl-version-distribution.arch>.tar.gz
Navigate the extracted folder hierachy and run the following command to make the
virtctl
binary executable:$ chmod +x <virtctl-file-name>
Move the
virtctl
binary to a directory in yourPATH
environment variable.To check your path, run the following command:
$ echo $PATH
For Windows users:
Unpack and unzip the archive.
Navigate the extracted folder hierarchy and double-click the
virtctl
executable file to install the client.Move the
virtctl
binary to a directory in yourPATH
environment variable.To check your path, run the following command:
C:\> path
For macOS users:
Unpack and unzip the archive.
Move the
virtctl
binary to a directory in yourPATH
environment variable.To check your path, run the following command:
echo $PATH
Installing the virtctl RPM package
You can install the virtctl
client 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 8, run:
# subscription-manager repos --enable cnv-4.11-for-rhel-8-x86_64-rpms
To enable the repository for Fedora 7, run:
# subscription-manager repos --enable rhel-7-server-cnv-4.11-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:# yum install kubevirt-virtctl
Additional resources
- Using the CLI tools for OKD Virtualization.