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.

How can I Change amount of Ram and CPU cores for a virtual machine in KVM that is already created? Thanks

share|improve this question
1  
IN run-time or with reboot? That would be really good to know BTW. –  Andrew Smith Jun 29 '12 at 22:11
    
+1 - Also would be worth clarifying whether this would be in virt-manager (as referenced in previous question) or from command line. –  rnxrx Jun 30 '12 at 1:44
    
Thanks, I think It's easier to change this in reboot and yes I created VMs in virt-manager but command-line is ok. –  Zim3r Jun 30 '12 at 4:18
add comment

2 Answers

up vote 4 down vote accepted

You can edit its XML from command-line with:

virsh name_vhost

Then, you only have to search the <memory> tag and modify it

Keep in mind that the memory allocation is in kilobytes, so to allocate 512MB of memory, use 512 * 1024, or 524288.

share|improve this answer
    
Really Thanks, Can I increase CPU cores with this method ? –  Zim3r Jun 30 '12 at 10:12
1  
You should check this out semanticlab.net/index.php/… ;) –  JavierMartinez Jun 30 '12 at 10:15
    
Is there any other way ? besides what is explaing on semanticlab.net –  Zim3r Jun 30 '12 at 11:09
add comment

You can edit the VM settings in virt-manager or in cli by changing the XML in virsh edit VMNAME

share|improve this answer
    
Thanks for your help. –  Zim3r Jul 1 '12 at 13:44
add comment

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.