3.2. Using the CLI tools
You can manage OpenShift Virtualization resources by using the virtctl command-line tool. Virtual machine (VM) commands can also be used to manage virtual machine instances (VMIs) unless otherwise specified.
You can access and change VM disk images by using the libguestfs command-line tool. You deploy libguestfs by using the virtctl libguestfs command.
3.2.1. Installing the virtctl binary on RHEL 9 or later, Linux, Windows, or macOS 링크 복사링크가 클립보드에 복사되었습니다!
You can download the virtctl binary by using the OpenShift Container Platform web console and then install it on Red Hat Enterprise Linux (RHEL) 9 or later, Linux, Windows, or macOS.
Procedure
-
Navigate to the Virtualization
Overview page in the web console. -
Click the Download virtctl link to download the
virtctlbinary for your operating system. Install
virtctl:For RHEL and other Linux operating systems:
Decompress the archive file:
$ tar -xvf <virtctl-version-distribution.arch>.tar.gzRun the following command to make the
virtctlbinary executable:$ chmod +x <path/virtctl-file-name>Move the
virtctlbinary to a directory in yourPATHenvironment variable.You can check your path by running the following command:
$ echo $PATHSet the
KUBECONFIGenvironment variable:$ export KUBECONFIG=/home/<user>/clusters/current/auth/kubeconfig
For Windows:
- Decompress the archive file.
-
Navigate the extracted folder hierarchy and double-click the
virtctlexecutable file to install the client. Move the
virtctlbinary to a directory in yourPATHenvironment variable.You can check your path by running the following command:
C:\> path
For macOS:
- Decompress the archive file.
Move the
virtctlbinary to a directory in yourPATHenvironment variable.You can check your path by running the following command:
echo $PATH