mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
32 lines
701 B
Plaintext
32 lines
701 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
|
|
|
|
[role="_abstract"]
|
|
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>
|
|
----
|