1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-27 07:22:07 +03:00
libvirt/docs/drvch.rst
William Douglas 56fbabf1a1 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>
2021-06-04 10:56:06 +01:00

56 lines
1.7 KiB
ReStructuredText

=======================
Cloud Hypervisor driver
=======================
.. contents::
Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that
runs on top of KVM. The project focuses on exclusively running modern,
cloud workloads, on top of a limited set of hardware architectures and
platforms. Cloud workloads refers to those that are usually run by
customers inside a cloud provider. For our purposes this means modern
operating systems with most I/O handled by paravirtualised devices
(i.e. virtio), no requirement for legacy devices, and 64-bit CPUs.
The libvirt Cloud Hypervisor driver is intended to be run as a session
driver without privileges. The cloud-hypervisor binary itself should be
``setcap cap_net_admin+ep`` (in order to create tap interfaces).
Expected connection URI would be
``ch:///session``
Example guest domain XML configurations
=======================================
The Cloud Hypervisor driver in libvirt is in its early stage under active
development only supporting a limited number of Cloud Hypervisor features.
Firmware is from
`hypervisor-fw <https://github.com/cloud-hypervisor/rust-hypervisor-firmware/releases>`__
**Note: Only virtio devices are supported**
::
<domain type='kvm'>
<name>cloudhypervisor</name>
<uuid>4dea22b3-1d52-d8f3-2516-782e98ab3fa0</uuid>
<os>
<type>hvm</type>
<kernel>hypervisor-fw</kernel>
</os>
<memory unit='G'>2</memory>
<devices>
<disk type='file'>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='ethernet'>
<model type='virtio'/>
</interface>
</devices>
<vcpu>2</vcpu>
</domain>