With the upcoming changes to cgo in Go 1.6 this package will probably break. We'll need to update it and crank through PRs together. Let's get things in 🚢 shape.
Go bindings for libvirt.
Make sure to have libvirt-dev
package (or the development files otherwise somewhere in your include path)
Currently, the only supported version of libvirt is 1.2.2, tagged as v2.x
releases gopkg.in/alexzorin/libvirt-go.v2
(docs).
The bindings will probably work with versions of libvirt that are higher than 1.2.2, depending on what is added in those releases. However, no features are currently being added that will cause the build or tests to break against 1.2.2.
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 7 | 1.2.4 from wheezy-backports |
Debian 6 | 0.9.12 from squeeze-backports |
Ubuntu 14.04 | 1.2.2 from trusty |
RHEL 6 | 0.10.x |
RHEL 5 | 0.8.x |
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).
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/{branch}
(i.e./vagrant/master
, where you will find aVagrantfile
for themaster
branch)vagrant up
to provision the virtual machinevagrant ssh
to login to the virtual machine
Once inside, sudo su -
, cd /libvirt-go
and go test -tags integration
.