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-editing-vm-cli.adoc

33 lines
749 B
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-edit-vms.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-editing-vm-cli_{context}"]
= Editing a virtual machine by using the CLI
You can edit a virtual machine (VM) by using the command line.
.Prerequisites
* You installed the `oc` CLI.
.Procedure
. Obtain the virtual machine configuration by running the following command:
+
[source,terminal]
----
$ oc edit vm <vm_name>
----
. Edit the YAML configuration.
. If you edit a running virtual machine, you need to do one of the following:
* Restart the virtual machine.
* Run the following command for the new configuration to take effect:
+
[source,terminal]
----
$ oc apply vm <vm_name> -n <namespace>
----