# py-bhyve **Repository Path**: mirrors_freenas/py-bhyve ## Basic Information - **Project Name**: py-bhyve - **Description**: Cython module for bhyve interface (libvmmapi) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # py-bhyve ![Python Version](https://img.shields.io/badge/Python-3.6-blue.svg) ## 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)`