From Fedora Project Wiki
(Created page with 'Notes from virtualization test day Test_Day:2009-05-07_Virtualization specifically for Test_Day:2009-05-07_Virtualization:XenDomU. = Xen DomU = == Install == Worked for ...')
 
Line 10: Line 10:
  
 
== Memory Ballooning ==
 
== Memory Ballooning ==
=== 32 bit guest ===
+
=== 64 bit guest ===
Original guest was 1G. Test was:
+
Original guest was 768M. Test was:
 
<pre>
 
<pre>
 
virsh shutdown f11
 
virsh shutdown f11
Line 30: Line 30:
 
==== Balloon Up - fail? ====
 
==== Balloon Up - fail? ====
 
<pre>
 
<pre>
[root@felix tmp]# grep -i memory f11-32.xml
+
[root@felix tmp]# grep -i memory f11.xml
 
   <memory>1048576</memory>
 
   <memory>1048576</memory>
 
   <currentMemory>524288</currentMemory>
 
   <currentMemory>524288</currentMemory>
  
 
# guest is running...
 
# guest is running...
[root@felix xen]# virsh setmem f11-32 $(( 1024 * 1000 ))
+
[root@felix xen]# virsh setmem f11 $(( 1024 * 1000 ))
  
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[2009-05-06 23:24:23 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.
 
[2009-05-06 23:24:23 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.
  
[root@felix xen]# virsh dominfo f11-32 | grep memory
+
[root@felix xen]# virsh dominfo f11 | grep memory
 
Max memory:    1048576 kB
 
Max memory:    1048576 kB
 
Used memory:    524288 kB
 
Used memory:    524288 kB
Line 49: Line 49:
 
==== Balloon Down - PASS ====
 
==== Balloon Down - PASS ====
 
<pre>
 
<pre>
[root@felix tmp]# virsh setmem f11-32 $(( 1024 * 256 ))
+
[root@felix tmp]# virsh setmem f11 $(( 1024 * 256 ))
  
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[2009-05-06 23:36:08 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 256 MiB.
 
[2009-05-06 23:36:08 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 256 MiB.
  
[root@felix tmp]# virsh dominfo f11-32|grep memory
+
[root@felix tmp]# virsh dominfo f11|grep memory
 
Max memory:    1048576 kB
 
Max memory:    1048576 kB
 
Used memory:    262144 kB
 
Used memory:    262144 kB
Line 65: Line 65:
  
 
<pre>
 
<pre>
[root@felix tmp]# virsh setmem f11-32 $(( 1024 * 1000 ))
+
[root@felix tmp]# virsh setmem f11 $(( 1024 * 1000 ))
  
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
 
[2009-05-06 23:40:04 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.
 
[2009-05-06 23:40:04 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.
[root@felix tmp]# virsh dominfo f11-32|grep memory
+
[root@felix tmp]# virsh dominfo f11|grep memory
 
Max memory:    1048576 kB
 
Max memory:    1048576 kB
 
Used memory:    524288 kB
 
Used memory:    524288 kB

Revision as of 10:45, 7 May 2009

Notes from virtualization test day Test_Day:2009-05-07_Virtualization specifically for Test_Day:2009-05-07_Virtualization:XenDomU.

Xen DomU

Install

Worked for

  • dom0 RHEL-5.3 with updated 5.4 test packages, 2.6.18-141.el5xen #1 SMP Wed May 6 03:54:02 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Quad-Core AMD Opteron(tm) Processor 2350
fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc pni monitor cx16 lahf_lm cmp_legacy svm cr8_legacy

Memory Ballooning

64 bit guest

Original guest was 768M. Test was:

virsh shutdown f11
virsh dumpxml f11 > f11.xml
  • Add currentMemory parameter which defines minimum memory given to guest at boot.
<memory>1048576</memory>
<currentMemory>524288</currentMemory>
  • Enact this guest config in Xen via libvirt.
virsh define f11.xml
virsh start f11

See: QA_talk:Testcase_Virtualization_XenDomU_Memory_Ballooning

Balloon Up - fail?

[root@felix tmp]# grep -i memory f11.xml
  <memory>1048576</memory>
  <currentMemory>524288</currentMemory>

# guest is running...
[root@felix xen]# virsh setmem f11 $(( 1024 * 1000 ))

[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
[2009-05-06 23:24:23 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.

[root@felix xen]# virsh dominfo f11 | grep memory
Max memory:     1048576 kB
Used memory:    524288 kB

After few minutes guest free -m still reports 519.

Balloon Down - PASS

[root@felix tmp]# virsh setmem f11 $(( 1024 * 256 ))

[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
[2009-05-06 23:36:08 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 256 MiB.

[root@felix tmp]# virsh dominfo f11|grep memory
Max memory:     1048576 kB
Used memory:    262144 kB

Guest free -m reports 256.

Balloon Back Up - PASS

Apparently I'm mistaken in my understanding of <memory> and <currentMemory> tags. I was not able to balloon above 519.

[root@felix tmp]# virsh setmem f11 $(( 1024 * 1000 ))

[root@felix tmp]# grep 'memory target' /var/log/xen/xend.log |tail -1
[2009-05-06 23:40:04 28390] DEBUG (XendDomainInfo:664) Setting memory target of domain f11-32 (7) to 1000 MiB.
[root@felix tmp]# virsh dominfo f11|grep memory
Max memory:     1048576 kB
Used memory:    524288 kB

Guest free -m reports 519 again.