Skip to content

Architecture: add high level view section #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/img/architecture/Network-Stack-Component.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/img/architecture/XCP-ng-Container.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/img/architecture/XCP-ng-SystemContext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

This page contains advanced info regarding XCP-ng architecture.

## High level view

Here you can find a high level view of how XCP-ng is interacted with by users and other applications, as well as the various blocks that it is made of. This part follows the [c4 model](http://c4model.com) principle for its diagrams.

### Interactions

The Hypervisor runs on a host, and is managed by its user directly via CLI, or through other administration applications such as [Xen Orechestra](https://xen-orchestra.com/#!/xo-home)j or [XCP-ng Center](https://github.com/xcp-ng/xenadmin)
![c4 system context diagram of XCP-ng](../assets/img/architecture/XCP-ng-SystemContext.svg)

### Main Building Blocks

Inside the hypervisor, there are various parts allowing its main features:
- Controlling and configuring XCP-ng
- Controlling and configuring the VMs
- Making network and Storage work for the host and guests
- Fetching information about the host and the guests

Here is how they organize and interface with each others:

![c4 container diagram of XCP-ng](../assets/img/architecture/XCP-ng-Container.svg)

## Network

This parts focuses on XCP-ng and Para-Virtualized VMs.

In XCP-ng, at the dom0 level, most of the networking is handled by [Open vSwitch](http://www.openvswitch.org/) for routing, filtering, tunneling and more. It hooks early in the Linux network stack, and the PV drivers handle the devices and their communication with the VMs.

![c4 component diagram of XCP-ng's Network Stack](../assets/img/architecture/Network-Stack-Component.svg)

The VIF driver is splitted in two parts:
- the backend that runs on the dom0 and creates network interfaces named `vif[…].0`, like `vif1.0`
- the frontend that runs on the guest VM and creates `enX0`

This driver communicates between the two sides through shared memory pages.

## Storage

### Virtual disks on HVMs and PV guests
Expand Down