Using Virtual machines templates is an easy way to create multiple virtual machines with similar configuration. After a template is created, reference the template when creating virtual machines.
The web console features an interactive wizard that guides you through the General,
Networking, Storage, Advanced, and Review steps to simplify the process of creating virtual machine templates.
All required fields are marked with a *
. The wizard prevents you from moving to the next step
until you provide values in the required fields.
In the container-native virtualization console, click Workloads → Virtual Machine Templates.
Click Create Template and select New with Wizard.
Fill in all required fields in the General step.
Click Next to progress to the Networking screen. A NIC that is named nic0
is attached by default.
Optional: Click Add Network Interface to create additional NICs.
Optional: You can remove any or all NICs by clicking the Options menu and selecting Delete. Virtual machines created from a template do not need a NIC attached. NICs can be created after a virtual machine has been created.
Click Next to progress to the Storage screen.
Optional: Click Add Disk to create additional disks.
Optional: Click a disk to modify available fields. Click the ✓ button to save the changes.
Optional: Click Disk to choose an available disk from the Select Storage list.
If either URL or Container are selected as the Source in the General step, a A Bootable Disk is not required for virtual machines provisioned from a PXE source if there are no disks attached to the virtual machine. If one or more disks are attached to the virtual machine, you must select one as the Bootable Disk. |
Click Create Virtual Machine Template >. The Results screen displays the JSON configuration file for the virtual machine template.
The template is listed in Workloads → Virtual Machine Templates.
The following tables describe the fields for the Basic Settings, Networking, and Storage panes in the Create Virtual Machine Template interactive wizard.
Name | Parameter | Description |
---|---|---|
Source |
PXE |
Provision virtual machine from PXE menu. Requires a PXE-capable NIC in the cluster. |
URL |
Provision virtual machine from an image available from an HTTP or S3 endpoint. |
|
Container |
Provision virtual machine from a bootable operating system container located in a registry accessible from the cluster. Example: |
|
Disk |
Provision virtual machine from a disk. |
|
Attach disk |
Attach an existing disk that was previously cloned or created and made available in the PersistentVolumeClaims. When this option is selected, you must manually complete the Operating System, Flavor, and Workload Profile fields. |
|
Operating System |
The primary operating system that is selected for the virtual machine. |
|
Flavor |
small, medium, large, tiny, Custom |
Presets that determine the amount of CPU and memory allocated to the virtual machine. The presets displayed for Flavor are determined by the operating system. |
Workload Profile |
High Performance |
A virtual machine configuration that is optimized for high-performance workloads. |
Server |
A profile optimized to run server workloads. |
|
Desktop |
A virtual machine configuration for use on a desktop. |
|
Name |
The name can contain lowercase letters ( |
|
Description |
Optional description field. |
Name | Description |
---|---|
Hostname |
Sets a specific host name for the virtual machine. |
Authenticated SSH Keys |
The user’s public key that is copied to ~/.ssh/authorized_keys on the virtual machine. |
Use custom script |
Replaces other options with a field in which you paste a custom cloud-init script. |
Name | Description |
---|---|
Name |
Name for the Network Interface Card. |
Model |
Driver for the Network Interface Card or model for the Network Interface Card. |
Network |
List of available NetworkAttachmentDefinition objects. |
Type |
List of available binding methods. For the default Pod network, |
MAC Address |
MAC address for the Network Interface Card. If a MAC address is not specified, an ephemeral address is generated for the session. |
Name | Description |
---|---|
Source |
Select a blank disk for the virtual machine or choose from the options available: PXE, Container, URL or Disk. To select an existing disk and attach it to the virtual machine, choose Attach Disk from a list of available PersistentVolumeClaims (PVCs) or from a cloned disk. |
Name |
Name of the disk. The name can contain lowercase letters ( |
Size (GiB) |
Size, in GiB, of the disk. |
Interface |
Name of the interface. |
Storage class |
Name of the underlying |