diff --git a/assets/img/architecture/Network-Stack-Component.svg b/assets/img/architecture/Network-Stack-Component.svg new file mode 100644 index 00000000..5a2efed2 --- /dev/null +++ b/assets/img/architecture/Network-Stack-Component.svg @@ -0,0 +1 @@ +Wednesday, June 28, 2023 at 4:54 PM Central European Summer Time[Component] XCP-ng - Network StackPV Drivers[Container]VIF Frontend[Component]-Network Stack[Container]VIF Backend[Component: C]VIF driver running on hostOpen vSwitch[Component: C]Network core of XCP-ngHost Kernel NetworkStack[Component: C]Kernel Network handlingXAPI[Container: OCaml, Python, C, […]]Centralized API to configure anXCP-ng host and its VMsConfiguresRemove link.Link options.ConfiguresRemove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Receivedspackets fromRemove vertex.Remove link.Link options.Sends packets toRemove vertex.Remove link.Link options.ConfiguresRemove link.Link options.Routes packets tothe right portRemove vertex.Remove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Receivedspackets fromRemove vertex.Remove link.Link options.Hooks early inRemove vertex.Remove link.Link options. \ No newline at end of file diff --git a/assets/img/architecture/XCP-ng-Container.svg b/assets/img/architecture/XCP-ng-Container.svg new file mode 100644 index 00000000..2edbaf0d --- /dev/null +++ b/assets/img/architecture/XCP-ng-Container.svg @@ -0,0 +1 @@ +Thursday, June 29, 2023 at 5:10 PM Central European Summer Time[Container] XCP-ngAdmin[Person]An administrator of host, poolsand VMsXCP-ng[Software System]Xen[Container: C, ASM]Low level microkernel hypervisorNetwork Stack[Container: C]Handle network configuration andtrafficxe[Container: C]CLI to a subset of the XAPI interfaceStorage Stack[Container: C, Python]Handle storage and block devicesxl[Container: C]Lower-level Xen tool bypassing XAPIXAPI[Container: OCaml, Python, C, […]]Centralized API to configure anXCP-ng host and its VMsVMs[Software System]PV Drivers[Container: C]Para-Virtualized drivers providingbetter performancesGuest-tools[Container: Go]Tools running on guest machines toprovide information and bettercontrolGuest OS[Container: Linux, Windows]An operating systemControlsRemove vertex.Remove link.Link options.Providesinformation toRemove link.Link options.Uses virtualdevices throughRemove vertex.Remove link.Link options.Provides PVdevices toRemove vertex.Remove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Configures xenusingRemove link.Link options.ConfiguresRemove link.Link options.ConfiguresRemove link.Link options.Manuallyadministrateshost and guestsusingRemove link.Link options.ConfiguresRemove link.Link options.Manages andconfiguresRemove link.Link options.Manuallyadministrateshost and guestsusingRemove link.Link options.ConfiguresRemove link.Link options.ControlsRemove vertex.Remove vertex.Remove vertex.Remove link.Link options.Receivedspackets fromRemove vertex.Remove link.Link options.Makes requeststoRemove link.Link options.ProvidesInformation toRemove vertex.Remove link.Link options.Provides storagetoRemove link.Link options. \ No newline at end of file diff --git a/assets/img/architecture/XCP-ng-SystemContext.svg b/assets/img/architecture/XCP-ng-SystemContext.svg new file mode 100644 index 00000000..b17ab8b0 --- /dev/null +++ b/assets/img/architecture/XCP-ng-SystemContext.svg @@ -0,0 +1 @@ +Wednesday, June 28, 2023 at 4:54 PM Central European Summer Time[System Context] XCP-ngAdmin[Person]An administrator of host, poolsand VMsXCP-ng Center[Software System]A windows based administrationinterfaceXCP-ng[Software System]A host running the XCP-nghypervisorXen Orchestra[Software System]Web interface for XCP-ng hostsadministrationVMs[Software System]PV, HVM, PVHVM virtual machinesAdministratesand backupsHosts, Pools andVMs usingRemove link.Link options.Sends packets toRemove vertex.Remove link.Link options.Providesinformation toRemove vertex.Remove link.Link options.Manuallyadministrateshost and guestsusingRemove link.Link options.AdministratesHosts, Pools andVMs usingRemove link.Link options.Runs on top ofRemove vertex.Remove link.Link options.Administratesand backups hostand its VMs onRemove vertex.Remove link.Link options.Providesinformation toRemove vertex.Remove link.Link options.Administrateshost and its VMsonRemove vertex.Remove link.Link options. \ No newline at end of file diff --git a/docs/architecture.md b/docs/architecture.md index 8e6f3e27..883746e2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -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