virsh setmaxmem domain size allows the setting of the maximum memory allocation for a guest virtual machine as shown:
virsh setmaxmem rhel6 1024
The size that can be given for the maximum memory is a scaled integer that by default is expressed in kibibytes, unless a supported suffix is provided. The following options can be used with this command:
--config - takes affect next boot
--live - controls the memory of the running domain, providing the hypervisor supports this action as not all hypervisors allow live changes of the maximum memory limit.
--current - controls the memory on the current domain