Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/ py-bhyve Public archive

Cython module for bhyve interface (libvmmapi)

Notifications You must be signed in to change notification settings

freenas/py-bhyve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-bhyve

Python Version

A wrapper for libvmmapi

py-bhyve is a wrapper to encapsulate the functionality of libvmmapi.

Installation

GitHub:

The FreeBSD source tree must be located at $FREEBSD_SRC (/usr/src by default) to build from git on BSD.

  • python setup.py build_ext -i && python setup.py install --user

The Illumos source tree must be located at $ILLUMOS_SRC to build from git for Illumos. Please point to the usr/src subdirectory (to match the behaviour with BSD)

  • For illumos-gate sources, use setup.illumos.py
  • For illumos-omnios sources, use setup.omnios.py It is likely that the module will compile correctly when using either tree, but the organisation of these differs and so we need to set different search paths. If you have no reason not to, it is recommended to clone the version for your specific OS.
export ILLUMOS_SRC=....
python3 setup.illumos.py build_ext -i # or setup.omnios.py, ...
python3 setup.illumos.py install --user # or sudo/pfexec setup.illumos.py install for zone-wide installation

FEATURES

  • Ease of use
  • Pythonic access to libvmmapi calls
  • Retrieving stats for vm's

QUICK HOWTO

import bhyve

Get a running VM:

vm = bhyve.get_vm('foo')

Fetch stats for a vm:

vm.get_stats()

This will return a dictionary of active vcpu's with their respective stats.

Get help:

help(bhyve.VM)

About

Cython module for bhyve interface (libvmmapi)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages