Edit a virtual machine by completing one of the following tasks:

  • Using the web console

  • Editing the virtual machine YAML configuration

  • Using the CLI

Using the web console to edit a virtual machine

Edit select values of a virtual machine in the Virtual Machine Overview screen of the web console. Other values can be edited using the CLI. Changes do not display until you reboot the virtual machine.

  • When editing from the Virtual Machine Overview screen, the virtual machine must be Off.

  1. Click WorkloadsVirtual Machines from the side menu.

  2. Select a Virtual Machine.

  3. Click Edit to make editable fields available.

  4. You can change the Flavor but only to Custom, which provides additional fields for CPU and Memory.

  5. Click Save.

    The values and virtual machine are updated after the operation is processed.

    If the virtual machine is running, changes will not display until the virtual machine is rebooted.

Editing the virtual machine YAML configuration

Edit the YAML configuration of a virtual machine the web console.

Not all parameters can be updated. If you edit values that cannot be changed and click Save, an error message indicates the parameter that was not able to be updated.

The YAML configuration can be edited while the virtual machine is Running, however the changes will only take effect after the virtual machine has been stopped and started again.

Navigating away from the YAML screen while editing cancels any changes to the configuration you have made.

  1. Click WorkloadsVirtual Machine from the side menu.

  2. Select a virtual machine.

  3. Click the YAML tab to display the editable configuration.

  4. Optional: You can click Download to download the YAML file locally in its current state.

  5. Edit the file and click Save.

A confirmation message shows that the modification has been successful and includes the updated version number for the object.

Using the CLI to edit a virtual machine

  • You configured your virtual machine with a YAML object configuration file.

  • You installed the oc CLI.

  1. Run the following command to update the virtual machine configuration.

    oc edit
  2. Open the object configuration.

  3. Edit the YAML.

  4. 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.

      oc apply