I am pretty new to virtualization. I have a host under my desk that is running 5 guests on kvm.
-the host (the physical server) runs ubuntu server 11.04 (natty)
-the guest (the virtual server) runs ubuntu server 10.04 (lucid)
-the client (my laptop) runs ubuntu desktop 11.10 (oneiric)
I use virt-manager ("Virtual Machine Manager") on my laptop to manage (and install) the guests.
One guest currently needs a lot of memory, it's swappig a lot. I closed the other guests down for a while and i now want to increase the memory that this guest may use, without having to start over on the calculations.
(btw closing down guests that were already idle didn't help at all to lower the high "load" on the host system)
virt-manager offers a button for increasing that memory (click the blue "i" for "information" in the toolbar of the virtual server that you have logged in to, select the "memomy" and increase the amount).
But it didn't work for me:
"These changes will take effect after the next guest shutdown.
this function is not supported by the connection driver: virDomainSetMaxMemory
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/details.py", line 2305, in _change_config_helper
File "/usr/share/virt-manager/virtManager/domain.py", line 743, in hotplug_both_mem
File "/usr/share/virt-manager/virtManager/domain.py", line 729, in hotplug_maxmem
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 842, in setMaxMemory
if ret == -1: raise libvirtError ('virDomainSetMaxMemory() failed', dom=self)
libvirtError: this function is not supported by the connection driver: virDomainSetMaxMemory"
I've read (link) that this should be possible with the qemu monitor, using:
But was having trouble reaching the qemu monitor to find out if this actually works.Code:info ballon - shows the allocated memory balloon 256 - sets the memory to 256MB
I've been searching a lot on google and found a lot of (partially confusing) material. What's confusing is that it sometimes seems unclear on which of the 3 machines which software needs te be installed and run.
Also people will use different client software to connect to (whatever computer) and that client is usually not installed, so you also have to find out what it is, if you really need it, what package provides it, etc.
I do not need a graphical display, so VNC is not really what i need, but i would have been happy if it had worked.
I also read that accessing the qemu monitor is very much discouraged, which made the virt-manager developers disable access to it (link).
Here is a quote about that discouragement in the manpage of virsh:"NOTE: Use of the following commands is strongly discouraged. They can cause libvirt to become confused and do the wrong thing on subsequent operations. Once you have used this command, please do not report problems to the libvirt developers; the reports will be ignored.".
Anyhow, i've found a way to issue the command to the qemu monitor now.
It doesn't seem to work, sadly. I would love to know why.
I found the solution here (link).
I use following command on the *host* system (in a ssh session):
btw the domain name is the name that you gave the virtual server.Code:wbloos@dbservertje2:~$ which virsh /usr/bin/virsh wbloos@dbservertje2:~$ virsh qemu-monitor-command --hmp lucid-topo-conv 'info balloon' balloon: actual=2048 wbloos@dbservertje2:~$ virsh qemu-monitor-command --hmp lucid-topo-conv 'balloon 10240' wbloos@dbservertje2:~$ virsh qemu-monitor-command --hmp lucid-topo-conv 'info balloon' balloon: actual=2048
should you have forgotten the name, you can look it up on the host with:
it's the parameter "-name"Code:ps fax|grep kvm
Hope this helps some people that are searching for similar stuff.
If you have any tips for me to increase the mem during runtime, please respond.