// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-edit-vms.adoc

[id="virt-editing-vm-cli_{context}"]
= Editing a virtual machine YAML configuration using the CLI

Use this procedure to edit a virtual machine YAML configuration using the CLI.

.Prerequisites

* You configured a virtual machine with a YAML object configuration file.
* You installed the `oc` CLI.

.Procedure

. Run the following command to update the virtual machine configuration:
+
[source,terminal]
----
$ oc edit <object_type> <object_ID>
----

. Open the object configuration.
. Edit the YAML.
. 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 <object_type> <object_ID>
----
