KVM Hypervisor

Implementation

A KVM VM is a resource_type vm_kvm. A vm_kvm is built on a KVM device.

The bom for vm_kvm comprises its hardware properties such as vCPU, RAM, HDD, SSD and Image. The Operating System image of a vm_kvm is from the CloudInit supported Linux Distribution. A vm_kvm must have at a minimum 1 vCPU, 2GB RAM and 10GB storage (HDD or SSD).

For vCPU and RAM, the maximum values are determined by the capacity availabe on a KVM devices in the region at the time of the request. For the primary storage, the maximum allowed is the lower of the KVM device capacity or 2TB. Secondary drives are built on Region’s Ceph cluster.

The vm_kvm resource_type has a Meta Table that has a vm_kvm.dns4 text property and vm_kvm.dns6 text property. These properties are to configure the DNS nameservers on the vm_kvm e.g. vm_kvm.dns4 = ‘8.8.8.8, 9.9.9.9’

A vm_kvm can have one or more vm_kvm_interfaces. A vm_kvm_interface is connected to a vrf_network_link in its project’s vrf. IPs from subnets in the vrf_network_link can be assigned to the vm_kvm_interface. They will be recorded as vm_kvm_interface.ipv4_address_ids and vm_kvm_interface.ipv6_address_ids. The vm_kvm_interface.gateway can be true for only one vm_kvm_interface of a vm_kvm. Only IPs from the gateway vm_kvm_interface can be routed to the public internet. Every vm_kvm_interface will be assigned a vm_kvm_interface.mac_address.

ERD


../../_images/kvm_hypervisor.png

API

Resources and Drivers

Primitives