On Tue, Mar 18, 2008 at 02:28:36PM -0400, Cole Robinson wrote:
Cole Robinson wrote:
> The attached patch implements the following operations for the qemu driver:
>
> virDomainGetMaxMemory
> virDomainSetMaxMemory
> virDomainSetMemory
>
> A few questions/comments:
>
> 1) I changed maxmem and memory in the qemu_vm_def struct to unsigned long
> to match the public api for memory values. Seems to work, but not sure
> if there are any undesirable side effects to this.
>
> 2) Should SetMaxMem be able to be called on a running guest? This code
> allows it, since maxmem is basically a metavalue that doesn't directly
> affect a guest.
>
> 3) Should maxmem be able to be set lower than the currently allocated mem?
> This code does not allow this. If this changed, would also need to take
> into account how we would handle this if we can change the maxmem while
> the guest is running. After rethinking, we probably should be able to
> do this, but I haven't changed the code.
>
> Thanks,
> Cole
>
In testing this with virt-manager I found a bug: I was using comparing maxmem
against the wrong memory value. Fixed this and updated the parameter names
to be a bit more clear. Seems to work as excepted now.
Okidoc, commited, thanks !
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/