Editing virtual machine templates

You can edit a virtual machine template in the web console.

You cannot edit a template provided by the Red Hat Virtualization Operator. If you clone the template, you can edit it.

Editing a virtual machine template in the web console

You can edit a virtual machine template by using the OKD web console or the command line interface.

Editing a virtual machine template does not affect virtual machines already created from that template.

Procedure

  1. Navigate to VirtualizationTemplates in the web console.

  2. Click the kebab Options menu beside a virtual machine template and select the object to edit.

  3. To edit a Red Hat template, click the kebab Options menu, select Clone to create a custom template, and then edit the custom template.

    Edit boot source reference is disabled if the template’s data source is managed by the DataImportCron custom resource or if the template does not have a data volume reference.

  4. Click Save.

Adding a network interface to a virtual machine template

Use this procedure to add a network interface to a virtual machine template.

Procedure

  1. Click VirtualizationTemplates from the side menu.

  2. Select a virtual machine template to open the Template details page.

  3. On the Network interfaces tab, click Add Network Interface.

  4. In the Add Network Interface window, specify the Name, Model, Network, Type, and MAC Address of the network interface.

  5. Click Add.

Adding a virtual disk to a virtual machine template

Use this procedure to add a virtual disk to a virtual machine template.

Procedure

  1. Click VirtualizationTemplates from the side menu.

  2. Select a virtual machine template to open the Template details page.

  3. On the Disks tab, click Add disk.

  4. Specify the Source, Name, Size, Type, Interface, and Storage Class.

    1. Optional: You can enable preallocation if you use a blank disk source and require maximum write performance when creating data volumes. To do so, select the Enable preallocation checkbox.

    2. Optional: You can clear Apply optimized StorageProfile settings to change the Volume Mode and Access Mode for the virtual disk. If you do not specify these parameters, the system uses the default values from the kubevirt-storage-class-defaults config map.

  5. Click Add.