Go bindings for libvirt
Go Ruby C
Permalink
Failed to load latest commit information.
vagrant Vagrantfile: make sure qemu is installed, add SMP Oct 14, 2016
.gitignore ci: replace drone.io tests by Travis CI Jul 27, 2016
.travis.yml domain: add test for BlockCopy(), BlockJobAbort() and GetBlockJobInfo… Dec 15, 2016
FAQ.md faq: Add a FAQ template and encourage more entries Oct 19, 2016
LICENSE Add licence, add tests for api so far Aug 18, 2013
README.md Fix deprecation notice english Jan 5, 2017
callbacks.go callbacks: move callback helpers to another file Aug 7, 2016
cfuncs.go DomainBlockJobEvent: fixed wrong callback Nov 17, 2016
constants.go domain: add BlockJobAbort(), GetBlockJobInfo() methods Dec 15, 2016
constants_1.2.14.go domain: add BlockJobAbort(), GetBlockJobInfo() methods Dec 15, 2016
domain.go domain: add BlockJobAbort(), GetBlockJobInfo() methods Dec 15, 2016
domain_1.2.14.go fix code style Dec 15, 2016
domain_1.2.14_test.go fix code style Dec 15, 2016
domain_test.go domain: restore original GetVcpus() to avoid API breakage Oct 14, 2016
error.go Merge pull request #101 from exoscale/feature/close-callbacks Aug 8, 2016
error_test.go Merge pull request #101 from exoscale/feature/close-callbacks Aug 8, 2016
events.go DomainBlockJobEvent: modify String() method Dec 15, 2016
events_test.go events: Return values should use golang idioms Oct 17, 2016
go_libvirt.h Add support for user/password authentication Aug 19, 2016
integration_test.go domain: add pinnings support to GetVCpus() Oct 14, 2016
interface.go Don't explicitly link to libdl Oct 21, 2015
interface_test.go test: ensure we don't have any connection leak Jul 27, 2016
libvirt.go Add GetVersion to get local libvirt version Oct 9, 2016
libvirt_test.go domain: add pinnings support to GetVCpus() Oct 14, 2016
libvirtd.conf Add tests for SASL user/password authentication Aug 19, 2016
network.go Add VirNetwork.GetDHCPLeases. Aug 29, 2016
network_1.2.14.go Add VirNetwork.GetDHCPLeases. Aug 29, 2016
network_test.go test: ensure we don't have any connection leak Jul 27, 2016
nodeinfo.go domain: add pinnings support to GetVCpus() Oct 14, 2016
nwfilter.go Don't explicitly link to libdl Oct 21, 2015
secret.go Don't explicitly link to libdl Oct 21, 2015
snapshot.go Don't explicitly link to libdl Oct 21, 2015
storage_pool.go Adding virStorageCreateXMLFrom. Jul 13, 2016
storage_pool_test.go test: ensure we don't have any connection leak Jul 27, 2016
storage_volume.go add pool lookup by volume Mar 10, 2016
storage_volume_test.go test: ensure we don't have any connection leak Jul 27, 2016
stream.go Don't explicitly link to libdl Oct 21, 2015

README.md

libvirt-go Build Status GoDoc

Go bindings for libvirt. These bindings are deprecated. Please, migrate to the new official version. You'll have to do some minor adjustments to your code.

Make sure to have libvirt-dev package (or the development files otherwise somewhere in your include path)

Version Support

The minimum supported version of libvirt is 1.2.2. Due to the API/ABI compatibility promise of libvirt, more recent versions of libvirt should work too.

Some features require a more recent version of libvirt. They are disabled by default. If you want to enable them, build using one of those additional tags (you need to use only the most recent one you are interested in):

  • 1.2.14

For example:

go build -tags libvirt.1.2.14

OS Compatibility Matrix

To quickly see what version of libvirt your OS can easily support (may be outdated). Obviously, nothing below 1.2.2 is usable with these bindings.

OS Release libvirt Version
FC19 1.2.9 from libvirt.org/sources
Debian 8 1.2.9 from jessie
Debian 7 1.2.9 from wheezy-backports
Ubuntu 14.04 1.2.2 from trusty
Ubuntu 16.04 1.3.1 from xenial
RHEL 7 1.2.17
RHEL 6 0.10.x
RHEL 5 0.8.x

0.9.x Support

Previously there was support for libvirt 0.9.8 and below, however this is no longer being updated. These releases were tagged v1.x at gopkg.in/alexzorin/libvirt-go.v1 (docs).

Documentation

Contributing

Please fork and write tests.

Integration tests are available where functionality isn't provided by the test driver, see integration_test.go.

A Vagrantfile is included to run the integration tests:

  • cd ./vagrant
  • vagrant up to provision the virtual machine
  • vagrant ssh to login to the virtual machine

Once inside, sudo su - and go test -tags integration libvirt.