{"id":32524020,"url":"https://github.com/ucphhpc/gen-vm-image","last_synced_at":"2026-01-20T17:01:02.365Z","repository":{"id":232770732,"uuid":"588074601","full_name":"ucphhpc/gen-vm-image","owner":"ucphhpc","description":"This tool can be used for generating virtual machine images","archived":false,"fork":false,"pushed_at":"2025-09-03T13:05:59.000Z","size":249,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-28T08:39:26.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ucphhpc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-12T09:09:37.000Z","updated_at":"2025-09-03T13:06:02.000Z","dependencies_parsed_at":"2024-05-21T15:52:13.375Z","dependency_job_id":"4468e7bf-38e6-4fe9-a6e0-22ed9bcf2631","html_url":"https://github.com/ucphhpc/gen-vm-image","commit_stats":null,"previous_names":["ucphhpc/gen-vm-image"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ucphhpc/gen-vm-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucphhpc%2Fgen-vm-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucphhpc%2Fgen-vm-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucphhpc%2Fgen-vm-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucphhpc%2Fgen-vm-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucphhpc","download_url":"https://codeload.github.com/ucphhpc/gen-vm-image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucphhpc%2Fgen-vm-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-28T08:33:03.678Z","updated_at":"2026-01-20T17:01:02.343Z","avatar_url":"https://github.com/ucphhpc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============\ngen-vm-image\n============\n\n.. image:: https://img.shields.io/pypi/pyversions/gen-vm-image.svg\n    :target: https://img.shields.io/pypi/pyversions/gen-vm-image\n.. image:: https://badge.fury.io/py/gen-vm-image.svg\n    :target: https://badge.fury.io/py/gen-vm-image\n\nThis package can be used for generating Virtual Machine Image(s) (VMI)s.\nThe ``gen-vm-image`` tool can also be used as an initializer plugin for `corc \u003chttps://github.com/rasmunk/corc\u003e`_\n\n------------\nDependencies\n------------\n\nThe dependencies required to use this package to generate VMIs can be found in the ``dep`` directory for the supported distributions.\n\n------------\nInstallation\n------------\n\nThe current stable release version ``gen-vm-image`` tool can be installed directly from pypi via::\n\n    pip install gen-vm-image\n\nAlternatively, you can install the current development version by firstly cloning the repository::\n\n  git clone https://github.com/ucphhpc/gen-vm-image.git\n\nThen, secondly installing the ``gen-vm-image`` tool either in its own virtual environment::\n\n  cd gen-vm-image\n  make install\n\nor systemwide::\n\n    cd gen-vm-image\n    make install PYTHON=path/to/your/systemwide/python\n\n-----------------------------------\nGenerating Virtual Machine Image(s)\n-----------------------------------\n\nThe ``gen-vm-image`` tool provides two distinct methods for generating VMIs, namely the ``single`` and ``multiple`` commands for generating image(s).\nEither of these commands can be selected via the ``gen-vm-image`` CLI::\n\n    gen-vm-image --help\n    usage: gen-vm-image [-h] [--version] {single,multiple} ...\n\n    options:\n      -h, --help         show this help message and exit\n      --version, -V      Print the version of the program\n\n    COMMAND:\n      {single,multiple}\n\n\nSingle Image\n============\n\nThe ``single`` CLI command provides the most straigthforward method for quickly generating a single VMI.\nInformation on the various options for the ``single`` command can also be displayed via the ``--help`` option.\nAs indicated by the help output, ``single`` command only requires two positional arguments::\n\n    usage: gen-vm-image single\n                        [-h]\n                        [-i SINGLE_INPUT]\n                        [-if SINGLE_INPUT_FORMAT]\n                        [-ict SINGLE_INPUT_CHECKSUM_TYPE]\n                        [-ic SINGLE_INPUT_CHECKSUM]\n                        [-icbs SINGLE_INPUT_CHECKSUM_BUFFER_SIZE]\n                        [-icrb SINGLE_INPUT_CHECKSUM_READ_BYTES]\n                        [-od SINGLE_OUTPUT_DIRECTORY]\n                        [-of SINGLE_OUTPUT_FORMAT]\n                        [-V SINGLE_VERSION]\n                        [--verbose]\n                        name\n                        size\n\n    options:\n      -h, --help            show this help message and exit\n\n    Generate a single Virtual Machine Image:\n      name                  The name of the image that will be generated.\n      size                  The size of the image that will be generated.\n      -i SINGLE_INPUT, --input SINGLE_INPUT\n                            The path or url to the input image that the generated image should be based on.\n      -if SINGLE_INPUT_FORMAT, --input-format SINGLE_INPUT_FORMAT\n                            The format of the input image. Will dynamically try to determine the format if not provided.\n      -ict SINGLE_INPUT_CHECKSUM_TYPE, --input-checksum-type SINGLE_INPUT_CHECKSUM_TYPE\n                            The checksum type that should be used to validate the input image if set.\n      -ic SINGLE_INPUT_CHECKSUM, --input-checksum SINGLE_INPUT_CHECKSUM\n                            The checksum that should be used to validate the input image if set.\n      -icbs SINGLE_INPUT_CHECKSUM_BUFFER_SIZE, --input-checksum-buffer-size SINGLE_INPUT_CHECKSUM_BUFFER_SIZE\n                            The buffer size that is used to read the input image when calculating the checksum value.\n      -icrb SINGLE_INPUT_CHECKSUM_READ_BYTES, --input-checksum-read-bytes SINGLE_INPUT_CHECKSUM_READ_BYTES\n                            The amount of bytes that should be read from the input image to be used to calculate the expected checksum value.\n      -od SINGLE_OUTPUT_DIRECTORY, --output-directory SINGLE_OUTPUT_DIRECTORY\n                            The path to the output directory where the image will be saved.\n      -of SINGLE_OUTPUT_FORMAT, --output-format SINGLE_OUTPUT_FORMAT\n                            The format of the output image.\n      -V SINGLE_VERSION, --version SINGLE_VERSION\n                            The version of the image that is generated.\n      --verbose, -v         Print verbose output.\n\nSome simple examples for its usage can be seen below.\n\nBasic Single Image Disk Example\n-------------------------------\n\nTo generate a simple 20 GB disk image that is not based on any existing image, the following basic command can be used::\n\n    gen-vm-image single basic-disk-image 20G\n\nIf no optional ``-od/--output-directory`` is set, the disk image will be generated in the default ``generated-image`` directory in your current working directory.\nBy default the ``gen-vm-image`` will generate the VMI with the `qcow2 \u003chttps://en.wikipedia.org/wiki/Qcow\u003e`_ format. This can be changed via the ``-of/--output-format`` option.\n\nImage Based on an Existing Image\n--------------------------------\n\nThe following example will generate a 10 GB GenericCloud single disk image based on the Debian 12 distribution::\n\n    gen-vm-image single basic-image 10G -i https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2\n\nVerify Checksum of Downloaded Image\n-----------------------------------\n\nWhen generating a VMI based on an existing image that is downloaded, it is recommended that as part of the generation with\n``gen-vm-image`` that the downloaded image checksum is verified.\n\nFor instance with the `Image Based on an Existing Image` example, the expected checksum of the downloaded image\ncan be found at https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS::\n\n    gen-vm-image single basic-image 10G --input-checksum-type sha512 --input-checksum \u003cexpected_sha512_checksum_of_the_downloaded_image\u003e -i https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2\n\n\nMultiple Images\n===============\n\nWhen having to numerous many VMIs, it is useful to be able to do so in a single execution.\nAdditionally, when maintaining an infrastructure with many VMIs over time, it can be useful to have a structured definition that defines\nthis VMI infrastructure and is able to (re)produce it at will. The ``gen-vm-image`` tool allows you to do so with the ``multiple`` command::\nThe totality of the command can be seen below::\n\n    gen-vm-image multiple -h\n    usage: gen-vm-image multiple [-h] [-iod MULTIPLE_OUTPUT_DIRECTORY] [--overwrite] [--verbose] architecture_path\n\n    options:\n      -h, --help            show this help message and exit\n\n    Generate multiple Virtual Machine Images:\n      architecture_path     The path to the architecture file that defines the images that should be generated.\n      -iod MULTIPLE_OUTPUT_DIRECTORY, --output-directory MULTIPLE_OUTPUT_DIRECTORY\n                            The path to the output directory where the images will be saved.\n      --overwrite           Whether the tool should overwrite existing image disks.\n      --verbose, -v         Print verbose output.\n\n\nThe ``multiple`` command requires that you define and pass the path to an architecture file, that is a YAML formatted file that defines which VMIs that should be generated.\nThe expected structure of said architecture file can be seen below::\n\n    owner: \u003cstring\u003e # The owner of the image.\n    images: \u003ckey-value pair\u003e # The images to be generated.\n      \u003cimage-name\u003e:\n        name: \u003cstring\u003e # The name of the image.\n        version: \u003cstring\u003e # (Optional) The version of the image.\n        size: \u003cstring\u003e # The size of the to be generated vm image disk, can use suffixes such as 'K', 'M', 'G', 'T'.\n        format: \u003cstring\u003e # The format of the generated, cloud for instance be `raw` or `qcow2`.\n        input: \u003cdict\u003e # (Optional) Input can be defined if the generated image should be based on a pre-existing image.\n          path | url: \u003cstring\u003e # A local filesystem path or URL to an image that should be used as the input image for the generated image.\n          format: \u003cstring\u003e # The format of the input image, could for instance be `raw` or `qcow2`.\n          checksum: \u003cdict\u003e # A dictionary that defines the checksum that should be used to validate the input image.\n            type: \u003cstring\u003e # The type of checksum that should be used to validate the input image. For valid types, see the supported algorithms `Here \u003chttps://docs.python.org/3/library/hashlib.html#hashlib.new\u003e`_\n            value: \u003cstring\u003e # The checksum value that should be used to validate the input image.\n\nPractical examples of architecture files can be found in the ``examples`` directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucphhpc%2Fgen-vm-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucphhpc%2Fgen-vm-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucphhpc%2Fgen-vm-image/lists"}