From 703c157ee3b9db4f4565923ed9971dc9a8c629a4 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 3 Jun 2025 11:37:11 +0000 Subject: [PATCH] docs: update virt/vm --- virt/vm.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/virt/vm.md b/virt/vm.md index e9cbe42..164d86b 100644 --- a/virt/vm.md +++ b/virt/vm.md @@ -2,7 +2,7 @@ title: Machine definition description: Virtual machine hardware published: true -date: 2025-06-03T06:15:14.349Z +date: 2025-06-03T11:37:10.057Z tags: editor: markdown dateCreated: 2025-06-01T17:37:29.262Z @@ -10,7 +10,7 @@ dateCreated: 2025-06-01T17:37:29.262Z # Virtual machine hardware -Libvirt uses XML files to define virtual machine hardware. +Libvirt uses XML files to define virtual machine hardware, from the system firmware to virtual devices. In the context of libvirt, a virtual machine or guest system is called a domain. @@ -109,11 +109,11 @@ What is also done is to mark the memory as shared memory, which is necessary for There are multiple XML elements related to the (v)CPU, with many parameters for each of them. -the CPU allocation section defines the number of vCPU associated to the virtual machine. This number cannot exceed the total number of logical CPUs available in the host machine as well as the maximum number of that the KVM hypervisor can assign to a guest. +The CPU allocation section defines the number of vCPU associated to the virtual machine. This number cannot exceed the total number of logical CPUs available in the host machine as well as the maximum number of that the KVM hypervisor can assign to a guest. The number of logical CPUs is the number of physical cores multiply by the number of threads per core. -- In the following snippet, 4vCPU is assigned to the virtual machine +- In the following snippet, 4vCPU is assigned to the virtual machine: ``` @@ -124,14 +124,20 @@ The number of logical CPUs is the number of physical cores multiply by the numbe ``` -Another very important element is the CPU mode. +- Another very important element is the CPU mode: ``` [...] - - + + [...] ``` + +The `host-model` mode is not as fast as `host-passthrough` but should allow a guest to be migrated to a host running different hardware, which `host-passthrough` does not. + +In short: it offers a good balance between performance and functionality. + +The topology describes the number of sockets, dies, cores and threads. The total number of cores and threads, in particular, has to match the CPU allocation described above. \ No newline at end of file