1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-listing-vms-cli.adoc
2025-06-13 14:37:07 +00:00

31 lines
682 B
Plaintext

// Module included in the following assemblies:
//
// * virt/managing_vms/virt-list-vms.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-listing-vms-cli_{context}"]
= Listing virtual machines by using the CLI
You can either list all of the virtual machines (VMs) in your cluster or limit the list to VMs in a specified namespace by using the {oc-first}.
.Prerequisites
* You have installed the {oc-first}.
.Procedure
* List all of the VMs in your cluster by running the following command:
+
[source,terminal]
----
$ oc get vms -A
----
* List all of the VMs in a specific namespace by running the following command:
+
[source,terminal]
----
$ oc get vms -n <namespace>
----