libvirt-node

0.1.0 • Public • Published

Libvirt bindings for NodeJS

Build Status Dependency Status npm version

Node bindings for Libvirt

The bindings are generated from libvirt's exported api

Stability

Experimental. This library is still under active development and subject to non-backwards compatible changes in any future version. Use of this library is not recommended in production environments until version 1.0.0 is released.

Pre-requisites

  • libvirt-dev must be installed and in your include path
  • Node version that supports napi >= 8
  • gcc installed

Installation (linux)

Install libvirt-node through npm

sudo apt-get install libvirt-dev
npm install libvirt-node

Usage

const libvirt = require('libvirt-node');

let connection = libvirt.open('qemu:///system');
let domains = connection.listAllDomains(libvirt.VIR_CONNECT_LIST_DOMAINS_RUNNING);
console.log(`My running domains: ${domains.map(domain => domain.getName())}`);

More examples can be found in the tests

API

libvirt-node loosly mirrors the official libvirt docs with minor corrections (mainly without the virModule prefix)

Coverage

The API is still under development and not all libvirt functions are supported.

The whitelist has the supported (and not yet supported) functions.

Development

For development documentation please refer to DEVELOPMENT.md

License

libvirt-node is released under LGPL-2.1

Package Sidebar

Install

npm i libvirt-node

Weekly Downloads

1

Version

0.1.0

License

LGPL-2.0+

Unpacked Size

965 kB

Total Files

40

Last publish

Collaborators

  • ramyelkest