// 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 [role="_abstract"] 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 ---- . 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 -n ----