Managing VM Operating System Templates
This section outlines the different types of VM OS templates supported by MetalSoft. The method used to deploy a VM template depends on whether the underlying infrastructure is cloud-init based (pulling images) or uses a copy mechanism (pre-configured virtual machines).
VM Template Types
Section titled “VM Template Types”VM Templates are generally categorized into two distinct types based on their source and deployment methodology.
1. Cloud-Init Based VM Templates (Incus Installations)
Section titled “1. Cloud-Init Based VM Templates (Incus Installations)”These templates rely on pulling base images directly from a registry, typically associated with environments like Incus. This method ensures the VM starts with a clean slate image that is then configured using cloud-init assets.
You can find a sample template here
Structure and Assets: For proper deployment, these templates require four critical assets:
- Network Configuration (
network-config): Defines networking settings. - User Data (
user-data): Provides initial user setup details. - Vendor Data (
vendor-data): Contains vendor-specific configuration information. - Source Asset: Specifies the location of the base OS image.
Example Source Asset: The source asset instructs Incus to pull a specific, versioned image from a remote repository:
{ "server": "https://images.linuxcontainers.org", "alias": "ubuntu/24.04/cloud", "protocol": "simplestreams", "mode": "pull"}Requirements: Templates utilizing this method require the following installation parameters:
install.method:ds_lxdinstall.readymethod:wait_for_api_response- When creating via the API (This is set automatically in the UI):
device.type:vm
2. Copy Based VM Templates (vSphere Installations)
Section titled “2. Copy Based VM Templates (vSphere Installations)”These templates are used when deploying VMs within virtual environments like vSphere, where the template is a direct copy of an existing, pre-configured machine instance.
Structure and Assets: This process requires only one critical asset:
- Source Asset: Contains the reference name of the VM that was converted into a template on vSphere. It also defines the minimum disk size for the resulting VMs.
Example Source Asset: The template specifies the existing VCenter Template Name and required resources:
{ "templateName": "Ubuntu-22.04-template", "diskSizeGB": 30}Deployment Workflow (Copy Method):
- Admin Preparation: An administrator logs into vSphere, creates a VM with the desired OS, installs all necessary packages and tools.
- Template Conversion: Once fully configured, the admin converts this working VM into an official Template using standard vSphere tools (UI or CLI).
- MetalSoft Configuration: The admin then creates the MetalSoft VM Template entry, specifying the name of the converted template as it appears within vSphere.
- Deployment: MetalSoft subsequently provisions new VMs by making copies of this source Template and automatically injecting network and other necessary settings into each individual instance.
Requirements: Templates utilizing this method require the following installation parameters:
install.method:copyinstall.readymethod:wait_for_api_response- When creating via the API (This is set automatically in the UI):
device.type:vm
Container Templates (LXC/Incus)
Section titled “Container Templates (LXC/Incus)”Available since 7.5
Container templates are designed for deploying isolated, lightweight containerized environments using technologies like LXC or Incus. These templates follow a structure similar to cloud-init based VM templates, as they pull base images from registries.
Structure and Assets: For proper deployment, these containers require four critical assets:
- Network Configuration (
network-config): Defines container networking settings. - User Data (
user-data): Provides initial user setup details inside the container. - Vendor Data (
vendor-data): Contains vendor-specific configuration information. - Source Asset: Specifies the location of the base OS image.
Example Source Asset: This example instructs Incus to pull an Ubuntu cloud image directly from a public registry:
{ "server": "https://images.linuxcontainers.org", "alias": "ubuntu/24.04/cloud", "protocol": "simplestreams", "mode": "pull"}Requirements: Container templates require the following installation parameters:
install.method:ds_lxdinstall.readymethod:wait_for_api_response- When creating via the API (This is set automatically in the UI):
device.type:container