Xen FAQ Dom0: Difference between revisions

From Xen
Jump to navigationJump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
Domain 0 is a paravirt VM in reality, so the amount of ram you allocate to it is what you will see when using local tools like free, /proc/meminfo, top, etc.
Domain 0 is a paravirt VM in reality, so the amount of ram you allocate to it is what you will see when using local tools like free, /proc/meminfo, top, etc.


To see the full system ram, you need to use the xm tools... and in this case, 'xm info' which will show you all the system resources, as opposed to the resources available to dom0.
To see the full system ram, you need to use the xl tools... and in this case, 'xl info' which will show you all the system resources, as opposed to the resources available to dom0.


Also, you have 16GB ram on the system... you probably already know this, but be aware that without a PAE enabled kernel (if you're using 32bit Xen) you'll only see 4GB of this. PAE will allow you to use up to 16, or maybe 32 (I don't remember what the upper limit for PAE enabled Xen is off the top of my head).
Also, you have 16GB ram on the system... you probably already know this, but be aware that without a PAE enabled kernel (if you're using 32bit Xen) you'll only see 4GB of this. PAE will allow you to use up to 16, or maybe 32 (I don't remember what the upper limit for PAE enabled Xen is off the top of my head).
Line 12: Line 12:
=== Can I allocate one CPU to the Dom0 exclusively? ===
=== Can I allocate one CPU to the Dom0 exclusively? ===


Add this to the kernel boot line - dom0_max_vcpus=1 & dom0_vcpus_pin
Add this to the kernel boot line - <code>dom0_max_vcpus=1</code>.


To force dom0 to also run on a single pcpu also add <code>dom0_vcpus_pin</code>.
Edit /etc/xen/xend-config.sxp - set <tt>(dom0-cpus 1)</tt> then reboot Dom0.


To try on an active system without a Reboot, use the following commands -
To try on an active system without a Reboot, use the following commands -


# xm vcpu-set 0 1
# xl vcpu-set 0 1
# xm vcpu-pin 0 0 0
# xl vcpu-pin 0 0 0


=== Running xm info I see the following memory available; what does the free memory mean? ===
=== Running "xl info" I see the following memory available; what does the "free memory" mean? ===


total_memory : 2046
total_memory : 2046 free_memory : 5
free_memory : 5


Free_memory from "xm info" shows memory not allocated to any domain (inlcuding dom0). "free", "top" (or whatever) shows free memory on that particular domain (in your case, dom0). You can adjust memory allocation per domain using "xm mem-set".
The entry "free_memory" from "xl info" shows memory not allocated to any domain (including dom0). "free", "top" (or whatever) shows free memory on that particular domain (in your case, dom0). You can adjust memory allocation per domain using "xl mem-set". The unit size is MiB.

=== How do I tell if I'm running in a dom0 or a domU? ===

Domain 0 will have a pseudo-file called <code>/proc/xen/capabilities</code> which will contain the string <code>control_d</code>. Some domUs will have the file and some will not; so a reliable shell test for running in Domain 0 would be:

-e /proc/xen/capabilities && grep -q control_d /proc/xen/capabilities


=== Domain 0 Won't Shutdown and There Are ACPI Errors in the Boot Log ===
=== Domain 0 Won't Shutdown and There Are ACPI Errors in the Boot Log ===
Line 31: Line 38:
If your ACPI is not functioning correctly, try adding "acpi=off" to the boot arguments in grub.conf.
If your ACPI is not functioning correctly, try adding "acpi=off" to the boot arguments in grub.conf.


=== There are messages saying my IOMMU is disabled on my 55x0 chipset ==
== There are messages saying my IOMMU is disabled on my 55x0 chipset ==


When booting, if you see:
When booting, if you see:
Line 43: Line 50:


<!-- Leave this at the end -->
<!-- Leave this at the end -->

== Where do I find more Dom0 FAQs? ==
== Where do I find more Dom0 FAQs? ==
See [[Xen_Common_Problems#Host_.2F_Dom0|Xen Common Problems#Host/ Dom0]]
See [[Xen_Common_Problems#Host_.2F_Dom0|Xen Common Problems#Host/ Dom0]]

Latest revision as of 12:55, 9 October 2019

Why cannot I see all my RAM on my Dom0?

Domain 0 is a paravirt VM in reality, so the amount of ram you allocate to it is what you will see when using local tools like free, /proc/meminfo, top, etc.

To see the full system ram, you need to use the xl tools... and in this case, 'xl info' which will show you all the system resources, as opposed to the resources available to dom0.

Also, you have 16GB ram on the system... you probably already know this, but be aware that without a PAE enabled kernel (if you're using 32bit Xen) you'll only see 4GB of this. PAE will allow you to use up to 16, or maybe 32 (I don't remember what the upper limit for PAE enabled Xen is off the top of my head).

Is there any way of checking DomU's I/O from Dom0?

iostat (Debian: sysstat-package)

Can I allocate one CPU to the Dom0 exclusively?

Add this to the kernel boot line - dom0_max_vcpus=1.

To force dom0 to also run on a single pcpu also add dom0_vcpus_pin.

To try on an active system without a Reboot, use the following commands -

# xl vcpu-set 0 1 
# xl vcpu-pin 0 0 0

Running "xl info" I see the following memory available; what does the "free memory" mean?

   total_memory : 2046
   free_memory : 5

The entry "free_memory" from "xl info" shows memory not allocated to any domain (including dom0). "free", "top" (or whatever) shows free memory on that particular domain (in your case, dom0). You can adjust memory allocation per domain using "xl mem-set". The unit size is MiB.

How do I tell if I'm running in a dom0 or a domU?

Domain 0 will have a pseudo-file called /proc/xen/capabilities which will contain the string control_d. Some domUs will have the file and some will not; so a reliable shell test for running in Domain 0 would be:

   -e /proc/xen/capabilities && grep -q control_d /proc/xen/capabilities

Domain 0 Won't Shutdown and There Are ACPI Errors in the Boot Log

If your ACPI is not functioning correctly, try adding "acpi=off" to the boot arguments in grub.conf.

There are messages saying my IOMMU is disabled on my 55x0 chipset

When booting, if you see:

(XEN) [VT-D]Disabling IOMMU due to Intel 5500/5520/X58 Chipset errata #47, #53 
(XEN) I/O virtualisation disabled 

consult this document for some workarounds.


Where do I find more Dom0 FAQs?

See Xen Common Problems#Host/ Dom0