How to change memory for DomU runtime

Posted by saffron on Server Fault See other posts from Server Fault or by saffron
Published on 2012-12-16T11:08:32Z Indexed on 2012/12/16 17:06 UTC
Read the original article Hit count: 164

Filed under:
|

I have a xen server with xen-4.1.3, linux-image-3.2.0-3-amd64, debian squeeze and 16Gb of RAM. The domain-0 has 1Gb of ram, the rest of memory belongs to the hypervisor. I want to start a guest domain with a minimal amount of memory and increase it runtime later.

When I start a guest domain with 256Mb of ram and run xm mem-set domu 4Gb, I get ~3Gb only in domu and a guest domain free says:

root@test:~# free
             total       used       free     shared    buffers     cached
Mem:       2830620      72868    2757752          0       2432      43504
-/+ buffers/cache:      26932    2803688
Swap:      1048572          0    1048572

And a guest domain dmesg says:

[    0.000000] Memory: 175912k/2883584k available (3527k kernel code, 448k absent, 2707224k reserved, 3210k data, 612k init)

When I start a guest domain with 2Gb of ram I can run xm mem-set domu 7Gb and get ~7Gb of ram in a guest domain:

root@test:~# free
             total       used       free     shared    buffers     cached
Mem:       6828228      74944    6753284          0       1328      12568
-/+ buffers/cache:      61048    6767180
Swap:      1048572          0    1048572

And a guest domain dmesg:

[    0.000000] Memory: 1674960k/16651264k available (3527k kernel code, 448k absent, 14975856k reserved, 3210k data, 612k init)

How can I start a guest domain with a minimal amount of ram (256Mb) and increase it under 15Gb?

© Server Fault or respective owner

Related posts about memory

Related posts about xen