Skip to main content

genutm

Project description

genutm

genutm creates aarch64 linux VMs that run via Apple Virtualization Framework utilizing UTM bundles, alongside the CIDATA cloud-init ISOs that hold the user-data and meta-data YAMLs.

installation and usage

docker is necessary to call qemu-imq without having to install the full qemu suite via brew. picocom is for providing serial console access when the user doesn't enable ssh key access for a user they create.

brew install docker utm --cask
brew install picocom

pip install genutm

genutm mkuser

cat << EOF > vm.yml
---
vmspec:
  dom_name: debian12arm1
  dom_mem: 2048
  dom_vcpu: 2
  vol_size: 10
  base_image: /Users/user/debian-12-generic-arm64.qcow2
  sshpwauth: yes
EOF

gencloud create vm.yml --users userspec-*.yml

open debian12arm1.utm

configuration

specification

domains

key necessity description
dom_name required str name of the domain
dom_mem required int amount of memory in megabytes
dom_vcpu required int core count
vol_size required int disk size in gigabytes
base_image required str full path to the cloud-init capable cloud image[1]
sshpwauth optional bool whether to allow ssh authentication via passwords (VM-wide, applies to all users)

users

key necessity description
name required str name of the user
password_hash optional str password hash in shadow compliant crypt() format (like mkuser output)
ssh_keys optional list of str list of ssh keys to append to the authorized_keys of the user
sudo_god_mode required bool toggle for adding the user to the sudo group and allowing it to run sudo without a password

WARNING: if you do not specify any authentication method in the file supplied via --users and if you:

  1. do not specify an arbitrary user-data file via --userdata,
  2. or, specify a user-data but the resulting final cloud-init user-data yaml to be written to the iso ends up having no valid authentication method

program will halt.

examples

--users <userspec.yml>

you can also do genutm mkuser to interactively generate a userspec.yml through prompts.

---
userspec:
    - name: john
      password_hash: '$y$j9T$/gPg8H0fdtuZh8Ja8decf.$f7IzP89gNaToHUsY2bdgaxv2HJsKSRYLyG6mxNZ6AW3'
      sudo_god_mode: true

    - name: doe
      ssh_keys:
        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI0000000000000000000000000000000000000000000

<vmspec.yml>

---
vmspec:
    dom_name: testvm
    dom_mem: 2048
    dom_vcpu: 2
    net: cloudvirt
    vol_size: 10
    base_image: /Users/user/debian-12-generic-arm64.qcow2
    sshpwauth: true

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genutm-0.2.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genutm-0.2-py2.py3-none-any.whl (24.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file genutm-0.2.tar.gz.

File metadata

  • Download URL: genutm-0.2.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for genutm-0.2.tar.gz
Algorithm Hash digest
SHA256 f51e1b9ac98ecea672e130e60e0847792d57cae6023af6b69ef19f32760aac96
MD5 70741bdec06e3dce248010dcfb5c9259
BLAKE2b-256 e797c4ea34404514293df51805433e6487cd1254300e515b235c095ed89ea4ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for genutm-0.2.tar.gz:

Publisher: pypi.yml on gottaeat/genutm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genutm-0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: genutm-0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for genutm-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d4fd2ce1329971b8b1ac6ba0ee28e077cb9a1e519af30b8a668d95462b316b16
MD5 fdaa1aedaf2006b3f11e02a23e88867f
BLAKE2b-256 2fadf6d7de8cbb6bf5b3edb4805f3de330d52300cd30e6f7d9d89dd6c4d5c760

See more details on using hashes here.

Provenance

The following attestation bundles were made for genutm-0.2-py2.py3-none-any.whl:

Publisher: pypi.yml on gottaeat/genutm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page