Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I just started using kvm on rhel6 and after creating a vm I tried to increase the memory but the changes I amde in the xml file do not propogate to vm, even after bouncing vm and restarting libvert?

[root@kvm01 qemu]# virsh dominfo dev-kvm01
Id: 2
Name: dev-kvm01
UUID: 9b2bf581-2807-3116-b176-60e9c0559943
OS Type: hvm
State: running
CPU(s): 2
CPU time: 1975.3s
Max memory: 7864320 kB
Used memory: 7864320 kB
Persistent: yes
Autostart: disable
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_t:s0:c47,c760 (enforcing)
[iknowmed@dev-kvm01 ~]$ free
           total       used       free     shared    buffers     cached
Mem:     3632284    3614508      17776          0       3980    3491676
-/+ buffers/cache:   118852    3513432
Swap:    5668856          0    5668856
share|improve this question
    
can you post the kvm cmd line? ps -ef|grep qemu –  dyasny Sep 3 '11 at 20:33

2 Answers 2

I believe that in your guest you might have a x86 (32 bit) kernel without PAE (Physical Address Extension) support. Those kernels are only able to support less than 4 GB of memory.

The easy solution is to switch to PAE enabled kernel (hopefully) provided by your Linux distribution.

The more difficult solution is to switch to x86_64/amd64 (64 bit) architecture but then you need to re-install the guest.

Edited to add:

Alternatively you might not have PAE enabled in your libvirt configuration.

If you do virsh edit dev-kvm01 you should see a features section such as follows:

<features>
    <pae/>
    <acpi/>
    <apic/>
</features>

If the <pae/> entry is not there, put it there and restart the guest.

share|improve this answer

You can follow the following steps to increase memory size of your KVM virtual machine.

  1. First shutdown vm virsh shutdown dev-kvm01

  2. After completion, verify memory settings in vm xml file and then run virsh undefine dev-kvm01 virsh define dev-kvm01

  3. Now start vm virsh start dev-kvm01

  4. Verify memory changes in the vm, I recommend not to use linux free program to check memory usage rather you can install a nice tool htop

yum install htop # For Red Hat/ CentOS / Fedora
apt-get install htop # For Debian / Ubuntu / Linux Mint

  1. Run htop

I hope this will solve your problem.

share|improve this answer
1  
5. Run only a single command htop –  Anam Khan Sep 5 '11 at 16:04
2  
2. Easier this way: virsh edit dev-kvm01 –  snap Sep 5 '11 at 16:12
    
The kernel ships with rhel6 already support PAE (more than 4 gb RAM) on 32bit architecture. –  Anam Khan Sep 6 '11 at 17:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.