]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add basic driver for the Cloud-Hypervisor
authorWilliam Douglas <william.douglas@intel.com>
Wed, 12 May 2021 17:01:31 +0000 (10:01 -0700)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 4 Jun 2021 09:56:06 +0000 (10:56 +0100)
commit56fbabf1a1e272c6cc50adcb603996cf8e94ad08
treea1a4e12036878357d0f79ea482887d198e289f8b
parent86e8f371399e8951ef915902b51809116f16c2db
Add basic driver for the Cloud-Hypervisor

Cloud-Hypervisor is a KVM virtualization using hypervisor. It
functions similarly to qemu and the libvirt Cloud-Hypervisor driver
uses a very similar structure to the libvirt driver.

The biggest difference from the libvirt perspective is that the
"monitor" socket is seperated into two sockets one that commands are
issued to and one that events are notified from. The current
implementation only uses the command socket (running over a REST API
with json encoded data) with future changes to add support for the
event socket (to better handle shutdowns from inside the VM).

This patch adds support for the following initial VM actions using the
Cloud-Hypervsior API:
 * vm.create
 * vm.delete
 * vm.boot
 * vm.shutdown
 * vm.reboot
 * vm.pause
 * vm.resume

To use the Cloud-Hypervisor driver, the v15.0 release of
Cloud-Hypervisor is required to be installed.

Some additional notes:
 * The curl handle is persistent but not useful to detect ch process
 shutdown/crash (a future patch will address this shortcoming)
 * On a 64-bit host Cloud-Hypervisor needs to support PVH and so can
 emulate 32-bit mode but it isn't fully tested (a 64-bit kernel and
 32-bit userspace is fine, a 32-bit kernel isn't validated)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
26 files changed:
docs/drivers.html.in
docs/drvch.rst [new file with mode: 0644]
docs/meson.build
include/libvirt/virterror.h
libvirt.spec.in
meson.build
meson_options.txt
po/POTFILES.in
src/ch/ch_conf.c [new file with mode: 0644]
src/ch/ch_conf.h [new file with mode: 0644]
src/ch/ch_domain.c [new file with mode: 0644]
src/ch/ch_domain.h [new file with mode: 0644]
src/ch/ch_driver.c [new file with mode: 0644]
src/ch/ch_driver.h [new file with mode: 0644]
src/ch/ch_monitor.c [new file with mode: 0644]
src/ch/ch_monitor.h [new file with mode: 0644]
src/ch/ch_process.c [new file with mode: 0644]
src/ch/ch_process.h [new file with mode: 0644]
src/ch/meson.build [new file with mode: 0644]
src/ch/virtchd.service.in [new file with mode: 0644]
src/ch/virtchd.sysconf [new file with mode: 0644]
src/meson.build
src/remote/remote_daemon.c
src/remote/remote_daemon_dispatch.c
src/util/virerror.c
tools/virsh.c