Operating systems (OS) from ISPsystem repositories are available in VMmanager by default:

To create a VM without an OS, the platform uses the repository "local".

You can connect your own repository with OS templates to VMmanager. This article describes how to create a repository and connect it in the platform settings.

Preparing a repository


You can use a server with access via HTTP (HTTPS) as a repository. The platform accesses the repository via the URL specified in the settings. For example, http://www.example.com/repo/. The repository directory must contain:

  • metadata.json file — repository description file;
  • OS template archives:
    • for Linux — in .xz format;
    • for Windows and templates for LXD clusters - in .tar.gz format.

Read more about Linux OS templates in Preparing the OS Linux template.

Read more about Windows OS templates in Preparing the OS Windows template.

To prepare an OS template that is not in any of the supported groups, use the instructions in Preparing the OS Linux template for a KVM cluster.

OS templates for LXD clusters should not be in the same repository as templates for KVM clusters.

The metadata.json file contains parameters for installing OS templates from the repository:

  • name — template name;
  • tags — template tags. Used for compatibility with scripts;
  • file_name — template file name;
  • image_name — template image name. Used to generate a file name for the template image on the cluster node. Only for KVM clusters;
  • expand — the name of the partition to be expanded when creating the VM. For example, if the template has /dev/sda1 (2 GB) and /dev/sda2 (3 GB) partitions, and you specify /dev/sda2 in the parameter, VMmanager will create /dev/sda1 (2 GB) and /dev/sda2 (8 GB) partitions when installing an OS on a VM with a 10 GB disk. Only for KVM clusters;
  • network_device — network device name. Only for KVM clusters;
  • archive_size_mib — archive size in MiB;
  • cpu_mode — CPU emulation mode:
    • default — QEMU virtual CPU is emulated;
    • host-model — the emulated CPU will have the same function flags as the cluster node CPU;
    • host-passthrough — the emulated CPU will exactly match the CPU on the host machine cluster node and have the same function flags;
      • For AlmaLinux 9 OS templates the value of the parameter should be host-passthrough.
      • If the Custom configuration was selected when creating the VM, the VM will be created with the emulation mode specified in that configuration.
      • If the parameter is not specified in the template, the VM will be created with the emulation mode specified in the configuration used.
  • image_size_mib — template image size in MiB. Only for KVM clusters;
  • min_size_mib — minimum disk size for OS in MiB; 

    You can determine the file size in MiB using the ls utility: 

    ls -l --block-size=M <file_name>
    BASH
  • updated_at — time of the last update of the template file;
  • checksum — the hash sum of the archive file, calculated using the SHA-1 algorithm; 

    You can determine the hash sum of a file using the sha1sum utility: 

    sha1sum <file_name>
    BASH
  • kms_supported — whether the OS supports activation through an own KMS server. Only for Windows templates. Possible values: true — supports, false — does not support;
  • efi_boot — load the template into EFI. Possible values: true — load, false — do not load.

An example of a repository description file for a KVM cluster

{
    "type": "os",
    "os": [
        {
            "name": "Ubuntu 20.04 ZFS",
            "tags": [
                "ubuntu20",
                "ubuntu",
                "linux"
            ],
            "file_name": "ubuntu-20.04-zfs.xz",
            "image_name": "ubuntu-20.04-zfs",
            "expand": "/dev/sda3",
            "network_device": "ens3",
            "archive_size_mib": 550,
            "cpu_mode": "host-passthrough",
            "image_size_mib": 2450,
            "min_size_mib": 10240,
            "updated_at": "2020-10-13 01:36:00",
            "checksum": "78e9564a81fdece34f1869ffc33d10e14dbef7d3"
        },
        {
            "name": "Windows Server 2019",
            "tags": [
                "windows",
                "windows2019"
            ],
            "file_name": "Windows-Server-2019-kms.tar.gz",
            "image_name": "windows_server_2019",
            "checksum": "751a72ba46964c89c29892c1c6be5c2c769f94f8",
            "expand": "/dev/sda2",
            "network_device": "eth0",
            "archive_size_mib": 5323,
            "image_size_mib": 15000,
            "min_size_mib": 15002,
            "updated_at": "2020-07-19 10:30",
            "kms_supported": true
        }
    ]
}
YML

An example of a repository description file for an LXD cluster

{
    "type": "lxd",
    "os": [
        {
			"name": "CentOS 7",
			"tags": ["centos","centos7","linux"],
			"file_name": "CentOS-7-amd64-20201223.tar.gz",
			"checksum": "30e5e1ca5b8a46b390cf1df6b99879f3be897421",
			"archive_size_mib": 180,
			"updated_at": "2020-12-23 08:22:05",
			"min_size_mib": 634
		}
    ]
}
CODE

Connecting the repository


To connect a repository, enter TemplatesRepositoriesAdd repository:

  1. Enter the repository Name or press generate.
  2. Enter the repository Address. E.g., http://example.com/repo/ or http://192.168.1.100/intrepo/.
  3. Press Add.

Repository adding form

To make OS from the repository available for installation, add them to the settings of the required cluster: Clusters → select the cluster → General settingsOperating system → select an OS from the repository → Save.

Selecting an OS from the repository in cluster settings

Managing repositories


To manage repositories, enter TemplatesRepositories.

To view the list of OS in the repository, click on ".. OS" in the "Content" column. The OS list is synchronized with the repository every 15 minutes.

To rename a repository, click on its name or image2020-5-26_10-19-50.png.

To delete a repository, press image2020-5-26_10-18-22.png.

If ISPsystem repositories were accidentally deleted, you can add them again. To do this, connect the repositories with the URL:


"Repositories" section