[virt-tools-list] setting memory at runtime fails?

Cole Robinson crobinso at redhat.com
Tue Aug 10 11:22:17 UTC 2010


On 08/10/2010 01:06 AM, Thomas Fjellstrom wrote:
> On August 9, 2010, Cole Robinson wrote:
>> On 08/08/2010 02:57 AM, Thomas Fjellstrom wrote:
>>> Hi,
>>>
>>> I've tried on several occasions to use the virt-manager to set memory
>>> in a guest at run time, but all it seems to do is set memory in the
>>> guest to a very small amount regardless of what number I actually
>>> chose (trying to use a number in KB doesn't work, the gui seems to
>>> have issues with it. it'll set the max mem, but trying to set mem to
>>> anything that large will just make it go back to the previous
>>> allocation).
>>>
>>> I just tried it again with virt-manager, memory was set to 256M, I told
>>> it to increase to 512MB, and it instantly dropped to 70MB and the
>>> guest OOMKilled every process. Then I forced the guest off, then tried
>>> to restart it and virt-manager decided to say it was going to set the
>>> memory to 1024MB, then crash. Though it did start the guest, but only
>>> with the 512MB I increased it to in the last step.
>>>
>>> virsh seems to work fine to reduce the memory in a vm. I did notice
>>> that virsh takes KB and virt-manager takes MB. Is it possible that
>>> virt-manager isn't doing the necessary conversion to KB when calling
>>> into libvirt?
>>
>> More info is really required here: versions for virt-manager, virtinst,
>> libvirt, and qemu or xen depending on what you are using. If you can
>> provide the output of virt-manager --debug when reproducing this series
>> of events it would help track down the issue.
> 
> libvirt-bin 0.8.2-1 
> virt-manager 0.8.4-7
> virtinst 0.500.3-2
> 
> qemu 0.12.5
> qemu-kvm 0.12.4+
> linux 2.6.34.1
> 
> I've attached a log of the --debug output of virt-manager for a session 
> where I start it up, it connects to two of my servers (boris, kvm based, the 
> one that likes to not set memory properly, and snidely xen based that we'll 
> ignore for now)
> 

Hmm, seems like virt-manager is using the correct values, at least for
redefining the persistent VM config.

> After I kill the vm in that log you'll see I try to set the memory again, 
> and restart the vm, but this time it just didn't start. it said it was 
> running, but virt-manager didn't want to connect to the console and the 
> stats for it were stuck, all I could do was "force off" again.
> 

Not sure what happened there, could be a weird side effect of the messed up
memory values.

Can you retry the memory change on a running VM, then provide:

virsh dumpxml $vmname
virsh dumpxml --inactive $vmname
virsh dominfo $vmname

What virsh command were you using for memory hotplug that worked successfully?
Can you try that too starting from a working config, then provide the virsh
output as above.

> Actually I'm confused as to why the xen one isn't reading disk usage 
> properly. Maybe it doesn't like that the xen setup is LVM backed rather than 
> file backed? But then the kvm instance is lvm backed too and that works fine.
> 

Not sure either. I'd file a xen bug with your distro.

- Cole




More information about the virt-tools-list mailing list