# xcp-ng/xenadmin architecture

> Architecture diagram of the GitHub repository xcp-ng/xenadmin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xcp-ng/xenadmin
- Repository: https://github.com/xcp-ng/xenadmin

## Overview

XCP-ng Center is a Windows graphical client for managing and monitoring XCP-ng and XenServer hosts, pools, and virtual machines. The documented user journey starts in the desktop client, connects to infrastructure, and uses management views and commands to monitor resources or perform VM operations such as deployment and migration. The tree and excerpts also show storage workflows, disaster recovery, console access, and optional plugins. Internal wiring is only shown where the source index or excerpts support it; other product capabilities are linked from the README and are not evidence of a particular call chain.

Main entry points: [`XenModel/Network/ConnectionsManager.cs`](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/ConnectionsManager.cs) (Connection manager), [`XenModel/Network/IXenConnection.cs`](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/IXenConnection.cs) (Host and pool connection), [`XenAdmin/Program.cs`](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Program.cs) (Application startup), [`XenAdmin/MainWindow.cs`](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/MainWindow.cs) (Management workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop client"]
  node_startup["Application startup<br/>[Program.cs]"]
  node_mainwindow["Management workspace<br/>[MainWindow.cs]"]
  node_selection["Resource selection"]
end

subgraph group_management["Infrastructure management"]
  node_commands["Management commands<br/>[Command.cs]"]
  node_storage["Storage management<br/>[SrStoragePage.cs]"]
end

subgraph group_vm["VM workflows"]
  node_vmstorage["VM storage view<br/>[VMStoragePage.cs]"]
  node_vmcreate["VM creation storage<br/>[Page_Storage.cs]"]
  node_import["VM import storage"]
  node_migration["Cross-pool migration"]
end

subgraph group_operations["Operations and insight"]
  node_dr["Disaster recovery"]
  node_console["Remote VM console<br/>[VNCView.cs]"]
  node_diagnostics["Health diagnostics"]
  node_plugins["Plugin extensions<br/>[PluginManager.cs]"]
end

subgraph group_model["Connection and model"]
  node_connections["Connection manager"]
  node_connection["Host and pool connection<br/>[IXenConnection.cs]"]
  node_cache[("Resource cache<br/>[Cache.cs]")]
  node_brand["Product configuration<br/>[BrandManager.cs]"]
end

node_user(("Administrator"))
node_xenapi{{"XenAPI service"}}

node_user -->|"starts client"| node_startup
node_startup -->|"opens workspace"| node_mainwindow
node_mainwindow -.->|"manages selection"| node_selection
node_user -.->|"connects resources"| node_connections
node_connections -->|"tracks connections"| node_connection
node_connections -->|"clears cache"| node_cache
node_connection -->|"exposes cache"| node_cache
node_connection -.->|"communicates with"| node_xenapi
node_user -.->|"manages hosts"| node_commands
node_user -->|"manages storage"| node_storage
node_user -->|"manages VM disks"| node_vmstorage
node_user -->|"deploys VMs"| node_vmcreate
node_user -.->|"imports VMs"| node_import
node_user -->|"migrates VMs"| node_migration
node_user -.->|"recovers workloads"| node_dr
node_user -->|"monitors VMs"| node_console
node_user -.->|"checks health"| node_diagnostics
node_user -.->|"extends client"| node_plugins

click node_startup "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Program.cs"
click node_mainwindow "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/MainWindow.cs"
click node_selection "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Commands/SelectionManager.cs"
click node_connections "https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/ConnectionsManager.cs"
click node_connection "https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/IXenConnection.cs"
click node_cache "https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/Cache.cs"
click node_commands "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Commands/Command.cs"
click node_storage "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/TabPages/SrStoragePage.cs"
click node_vmstorage "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/TabPages/VMStoragePage.cs"
click node_vmcreate "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/NewVMWizard/Page_Storage.cs"
click node_import "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/ImportWizard/StoragePickerPage.cs"
click node_migration "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/CrossPoolMigrateWizard/CrossPoolMigrateStoragePage.cs"
click node_dr "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/DRWizards/DRFailoverWizardStoragePage.cs"
click node_console "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/ConsoleView/VNCView.cs"
click node_diagnostics "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Diagnostics/Checks/VSwitchControllerCheck.cs"
click node_plugins "https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Plugins/PluginManager.cs"
click node_brand "https://github.com/xcp-ng/xenadmin/blob/development/XenModel/BrandManager.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_startup,node_mainwindow,node_selection toneBlue
class node_commands,node_storage toneAmber
class node_vmstorage,node_vmcreate,node_import,node_migration,node_xenapi toneMint
class node_dr,node_console,node_diagnostics,node_plugins toneRose
class node_connections,node_connection,node_cache,node_brand,node_user toneIndigo
```

## Components

### Desktop client

- [Application startup](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Program.cs): `XenAdmin/Program.cs`
- [Management workspace](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/MainWindow.cs): `XenAdmin/MainWindow.cs`
- [Resource selection](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Commands/SelectionManager.cs): `XenAdmin/Commands/SelectionManager.cs`

### Infrastructure management

- [Management commands](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Commands/Command.cs): `XenAdmin/Commands/Command.cs`
- [Storage management](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/TabPages/SrStoragePage.cs): `XenAdmin/TabPages/SrStoragePage.cs`

### VM workflows

- [VM storage view](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/TabPages/VMStoragePage.cs): `XenAdmin/TabPages/VMStoragePage.cs`
- [VM creation storage](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/NewVMWizard/Page_Storage.cs): `XenAdmin/Wizards/NewVMWizard/Page_Storage.cs`
- [VM import storage](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/ImportWizard/StoragePickerPage.cs): `XenAdmin/Wizards/ImportWizard/StoragePickerPage.cs`
- [Cross-pool migration](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/CrossPoolMigrateWizard/CrossPoolMigrateStoragePage.cs): `XenAdmin/Wizards/CrossPoolMigrateWizard/CrossPoolMigrateStoragePage.cs`

### Operations and insight

- [Disaster recovery](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Wizards/DRWizards/DRFailoverWizardStoragePage.cs): `XenAdmin/Wizards/DRWizards/DRFailoverWizardStoragePage.cs`
- [Remote VM console](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/ConsoleView/VNCView.cs): `XenAdmin/ConsoleView/VNCView.cs`
- [Health diagnostics](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Diagnostics/Checks/VSwitchControllerCheck.cs): `XenAdmin/Diagnostics/Checks/VSwitchControllerCheck.cs`
- [Plugin extensions](https://github.com/xcp-ng/xenadmin/blob/development/XenAdmin/Plugins/PluginManager.cs): `XenAdmin/Plugins/PluginManager.cs`

### Connection and model

- [Connection manager](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/ConnectionsManager.cs): `XenModel/Network/ConnectionsManager.cs`
- [Host and pool connection](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/IXenConnection.cs): `XenModel/Network/IXenConnection.cs`
- [Resource cache](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/Network/Cache.cs): `XenModel/Network/Cache.cs`
- [Product configuration](https://github.com/xcp-ng/xenadmin/blob/development/XenModel/BrandManager.cs): `XenModel/BrandManager.cs`

### Other components

- **Administrator**
- **XenAPI service**

## Connections

- Administrator → Application startup: starts client
- Application startup → Management workspace: opens workspace (evidence: `XenAdmin/Program.cs`)
- Management workspace → Resource selection: manages selection
- Administrator → Connection manager: connects resources
- Connection manager → Host and pool connection: tracks connections (evidence: `XenModel/Network/ConnectionsManager.cs`)
- Connection manager → Resource cache: clears cache (evidence: `XenModel/Network/ConnectionsManager.cs`)
- Host and pool connection → Resource cache: exposes cache (evidence: `XenModel/Network/IXenConnection.cs`)
- Host and pool connection → XenAPI service: communicates with
- Administrator → Management commands: manages hosts
- Administrator → Storage management: manages storage
- Administrator → VM storage view: manages VM disks
- Administrator → VM creation storage: deploys VMs
- Administrator → VM import storage: imports VMs
- Administrator → Cross-pool migration: migrates VMs
- Administrator → Disaster recovery: recovers workloads
- Administrator → Remote VM console: monitors VMs
- Administrator → Health diagnostics: checks health
- Administrator → Plugin extensions: extends client
