Managing OS templates¶
The 3.0.1 version of the metalcloud-cli
introduces a new series of commands that will help with the building of new operating system templates.
This new command metalcloud-cli os-template register
command allows the admin to download a standard ISO from a repository and then create all necessary records in MetalSoft for an OOB or PXE based install process.
MetalSoft provides a series of out-of-the-box ‘source templates’ (or base templates) covering major versions of operating systems. The ESXI 7 ‘source template’ can be used build and deploy ESXI 7.0.1, 7.0.2, 7.0.3… templates to an environment.
Listing available source templates¶
metalcloud-cli os-template list-source-templates
+-----------+-----------------------+--------------+----------------+-----------+-------------------------------------------+
| TYPE | VERSION | ARCHITECTURE | DEPLOY PROCESS | BOOT TYPE | SOURCE TEMPLATE PATH |
+-----------+-----------------------+--------------+----------------+-----------+-------------------------------------------+
| AlmaLinux | 8 | x64 | pxe | UEFI | AlmaLinux/non-OOB-8 |
| ESXi | 7.0.0 | x64 | virtual_media | UEFI | ESXi/OOB-7.0.0 |
| ESXi | 7.0.0.u03-DellEMC-A02 | x64 | virtual_media | UEFI | ESXi/OOB-7.0.0.u03-DellEMC_Customized-A02 |
| Ubuntu | 20.04 | x64 | virtual_media | UEFI | Ubuntu/non-OOB-20.04 |
| Ubuntu | 20.04 | x64 | pxe | UEFI | Ubuntu/non-OOB-20.04-iscsi-ibft-uefi |
| Ubuntu | 20.04.4 | x64 | virtual_media | UEFI | Ubuntu/OOB-20.04 |
| Windows | 2019 | x64 | virtual_media | UEFI | Windows/OOB-uefi 2019 |
| Windows | 10.0.17763 | x64 | virtual_media | UEFI | Windows/non-OOB-uefi 2019 |
| Windows | 2019 | x64 | virtual_media | Legacy | Windows/OOB-bios 2019 |
+-----------+-----------------------+--------------+----------------+-----------+-------------------------------------------+
Total: 9 Repository templates
Registering a new template¶
Besides the source template, the original iso is required for registering a new template.
- Download the ISO from any official repository to a local directory
- Identify the source template path required for the OS family you are adding such as Ubuntu/OOB-20.04 in the output of the
metalcloud-cli os-template list-source-templates
command. - Create the new template based on the downloaded iso and the entry in the source template path column
metalcloud-cli os-template register --source-template Ubuntu/OOB-20.04 --name "Ubuntu 20.04.4 OOB" --source-iso /a/iso/ubuntu-22.04.1-live-server-amd64.iso --label ubuntu-2004-oob
- Upload the ISO on the repo at the specified location if not already uploaded.
Checking if the template has been registered:¶
You can use the Sidebar > Templates to verify if the new template exists or use the CLI:
metalcloud-cli os-template list
+---+-----------------+--------------------+-------------+-------------+--------------+-----------------------+--------------------+---------------+---------+----------------------+----------------------+
| ID| LABEL | NAME | DESCRIPTION | SIZE_MBYTES | BOOT_METHODS | OS | INSTALL_BOOTLOADER | OS_BOOTLOADER | USER_ID | CREATED | UPDATED |
+---+-----------------+--------------------+-------------+-------------+--------------+-----------------------+--------------------+---------------+---------+----------------------+----------------------+
| 1 | ubuntu-2004-oob | Ubuntu 20.04.4 OOB | | 2048 | local_drives | Ubuntu 20.04.4 x86_64 | | | 3 | 2023-01-18T10:40:32Z | 2023-01-18T10:40:32Z |
+---+-----------------+--------------------+-------------+-------------+--------------+-----------------------+--------------------+---------------+---------+----------------------+----------------------+
Total: 1 Templates
Developing a new source template for legacy systems¶
If you need to build a new template for a new family of operating systems the following resource might help: Managing OS templates for legacy (PXE)