Introduction
This guide explains how to use the KVM hypervisor through its API directly without using any third party library or software such as libvirt, qemu etc.
A brief explanation of how the KVM system exposes itself is presented below. KVM hypervisor provides 4 types of ioctl or input/output controls. They are a logical hierarchy of what you would expect a hypervisor system to do. First you have system calls, which you can use to create a virtual machine. Once created you will receive a path or file descriptor to that VM which can be used to issue Virtual Machine Calls. After the VM is created, you will similarly receive a file descriptor. You can use this file descriptor as an address to issue both Virtual CPU calls and device calls.
System Calls
These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines.
Virtual Machine Calls
These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices.
Virtual CPU Calls
These query and set attributes that control the operation of a single virtual cpu.
Device Calls
These query and set attributes that control the operation of a single device.
Comments
Post a Comment