Go to file
Sergio Lopez 88a25a2d68 Refactor code to support multiple virtio transports at runtime
Currently, virtio transports for each device are determined with
architecture dependent build time conditionals. This isn't the ideal
solution, as virtio transports aren't exactly tied to the host's
architecture.

For example, aarch64 VMs do support both PCI and MMIO devices, and
after the recent introduction of the microvm machine type, that's also
the case for x86_64.

This patch extends each device that supports multiple transports with
a VirtioTransport field, so users of the library can manually specify
a transport for each device. To avoid breaking the compatibility, if
VirtioTransport is empty a behavior equivalent to the legacy one is
achieved by checking runtime.GOARCH and Config.Machine.Type.

Keeping support for isVirtioPCI/isVirtioCCW in qmp.go is a bit
tricky. Eventually, the hot-plug API should be extended so callers
must manually specify the transport for the device.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2020-02-07 18:17:12 +01:00
qemu Refactor code to support multiple virtio transports at runtime 2020-02-07 18:17:12 +01:00
.gitignore Add .gitignore file. 2017-12-11 11:05:31 +00:00
.travis.yml s390x: add s390x travis support 2019-12-17 14:54:09 +01:00
CONTRIBUTING.md Update the CONTRIBUTING.md 2018-11-30 09:34:21 +01:00
CONTRIBUTORS.md contributors: add my name 2018-12-06 11:35:15 +08:00
COPYING Add project documentation 2017-12-11 11:05:31 +00:00
README.md Compute coverage statistics for unit tests in Travis builds 2018-01-02 16:21:01 +00:00

Virtual Machine Manager for Go

Go Report Card Build Status GoDoc Coverage Status

Virtual Machine Manager for Go (govmm) is a suite of packages that provide Go APIs for creating and managing virtual machines. There's currently support for only one hypervisor, qemu/kvm, support for which is provided by the github.com/intel/govmm/qemu package.

The qemu package provides APIs for launching qemu instances and for managing those instances via QMP, once launched. VM instances can be stopped, have devices attached to them and monitored for events via the qemu APIs.

The qemu package has no external dependencies apart from the Go standard library and so is nice and easy to vendor inside other projects.