xl list show running domainsxl create cfg start a domUxl console N attach to domain consolexl info host/hypervisor summaryxenstore-ls dump xenstore treexl migrate D host live migrate domainxl dmesg hypervisor ring bufferDomain Topology
Xen is a Type-1 microkernel hypervisor: a thin privileged layer that owns CPU, memory and scheduling, while all rich device logic lives in guest domains.
Xen hypervisordom0xl/libxl) and backend drivers.domUdriver domainstub domainxenstored / xenconsoledExecution Modes: PV / HVM / PVH
| Mode | CPU virtualization | I/O path | Trade-off |
|---|---|---|---|
PV | Paravirtual; guest uses hypercalls, no VT-x needed | PV split drivers only | Needs Xen-aware kernel; weak isolation of page tables |
HVM | Hardware VT-x/AMD-V + EPT/NPT; QEMU emulates platform | Emulated devices, PV drivers via PVHVM | Runs unmodified OS; emulation overhead |
PVH | Hardware virt for CPU/MMU, no emulated platform | PV drivers + virtual local APIC | Lightweight modern default; needs PVH-capable kernel |
CPU Scheduling
Schedulers
credit2 is the default weighted fair-share scheduler; null statically pins vCPUs for latency-critical/NFV workloads; rtds offers a deadline-based real-time policy.
Controls
Tune per-domain weight and cap; bind vCPUs to pCPUs with affinity; isolate domains into cpupools each with its own scheduler.
xl sched-credit2 -d D -w 512xl vcpu-pin D vcpu pcpuxl cpupool-createxl vcpu-listMemory: Translation & Ballooning
P2M / M2P tablesballoon drivermaxmem and current target.xl mem-set D 2048tmem / claimsxl mem-max D 4096NUMA affinitySplit I/O: Grants, Event Channels, XenStore
Virtual devices are a frontend/backend pair connected through three primitives that together replace emulated hardware.
Grant references
A guest authorizes a specific backend to map or copy specific pages, enabling zero-copy I/O without exposing its whole address space.
Event channels
Lightweight virtual interrupts/IPIs that signal "ring has data" between front and back ends and deliver timer/IPI notifications.
vif / netfront ↔ netbackvbd / blkfront ↔ blkbackxenstore-ls /local/domain/Nxenstore-read path