= Changing the instance type of a VM by using the CLI
[role="_abstract"]
To change the instance type of a VM, change the `name` field in the VM spec. This triggers the update logic, which ensures that a new, immutable controller revision snapshot is taken of the new resource configuration.
.Prerequisites
* You have installed the {oc-first}.
* You created the VM by using an instance type, or have administrator privileges for the VM that you want to modify.
.Procedure
. Stop the VM.
. Run the following command, and replace `<vm_name>` with the name of your VM, and `<new_instancetype>` with the name of the instance type you want to change to:
* Check the controller revision reference in the updated VM `status` field. Run the following command and verify that the revision name is updated in the output:
+
[source,terminal]
----
$ oc get vms/<vm_name> -o json | jq .status.instancetypeRef
* Optional: Check that the VM instance is running the new configuration defined in the latest controller revision. For example, if you updated the instance type to use 2 vCPUs instead of 1, run the following command and check the output:
+
[source,terminal]
----
$ oc get vmi/<vm_name> -o json | jq .spec.domain.cpu