Skip to main content

Python3-based libvirt client

Project description

VMMan : a python3-based libvirt client

Requirements:
--------------------
Please run pip3 install -r requirements before running vmman
The kvm unix group must exist and whoever using vmman must be part of that group.
This software basically clones already-existing VMs (the 'templates') to create new ones according to your cli arguments.

Those template VMs must meet the following requirements:

  • the virt-clone and virsh binaries must be present where you run vmman
  • templated VM must allow ssh root@vm with key authentication

The following templates are currently supported: ubuntu, debian, centos, fedora, rocky. See templates.txt.

TODO (long term):

  • better exception handling
  • get a better handling of ssh with python3 (paramiko ?)
  • find some way to get virt-clone native

TOFIX vmman -c $HYPERVISOR create just wouldn't work for now vmman -c $HYPERVISOR rm wouldn't remove the VM's image (thought I had fixed that one !)

CURRENT KNOWN ISSUES: Sometimes when launching the shell script at the end of a VM creation (sh /tmp/execconfig.VMNAME-jfg_) it'll end up with a lost connection or no route to host.

This means that the VM had not finished booting up and thus cannot receive the new configs.
Workaround: just relaunch the shell script.

Sometimes post-install scripts fail to copy on the new VM. No workaround yet.

Important files to consider:

  • environment.yaml : this is where you fetch the target VMs network configuration
  • templates.txt : lists all the currently-supported templates, with some basic info
  • requirements.txt : this lists all the python modules used by this software
  • helpers.py, specifically Helpers.getConnectURI(), which shows how the hypervisor URI is constructed
  • vmman (formerly vmman.py; the program's entry point). Check around line 80, LOGLEVEL . Levels are explained at the top of the file.
  • _version.py : current software version

Project details


Release history Release notifications | RSS feed

This version

2.0

Download files

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

Source Distribution

vmman1-2.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

vmman1-2.0-py3-none-any.whl (2.1 kB view hashes)

Uploaded Python 3

Supported by

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