Description of problem:
As the --min-guarantee option list in virsh manual and help,so we need to support it.
# virsh help memtune
memtune - Get or set memory parameters
memtune <domain> [--hard-limit <number>] [--soft-limit <number>] [--swap-hard-limit <number>] [--min-guarantee <number>] [--config] [--live] [--current]
Get or set the current memory parameters for a guest domain.
To get the memory parameters use following command:
virsh # memtune <domain>
[--domain] <string> domain name, id or uuid
--hard-limit <number> Max memory in kilobytes
--soft-limit <number> Memory during contention in kilobytes
--swap-hard-limit <number> Max memory plus swap in kilobytes
--min-guarantee <number> Min guaranteed memory in kilobytes
--config affect next boot
--live affect running domain
--current affect current domain
memtune domain-id [--hard-limit kilobytes] [--soft-limit kilobytes]
[--swap-hard-limit kilobytes] [--min-guarantee kilobytes] [[--config]
[--live] | [--current]]
The guaranteed minimum memory allocation for the guest. The units
for this value are kilobytes (i.e. blocks of 1024 bytes).
# virsh memtune rhel6 --min-guarantee 10241024
error: Unable to change memory parameters
error: invalid argument: Memory tunable `min_guarantee' not implemented
Version-Release number of selected component (if applicable):
Steps to Reproduce:
virsh man page had better to improve documents, because users can't see any output when option --hard-limit, --soft-limit and --swap-hard-limit
the min-guarantee is introduced for ESX driver, please see:
Perhaps it will be a general tuning option for other drivers in future, but currently it's only used by ESX. And all the memory tunable for QEMU drivers are based on cgroup memory controller, which doesn't support thing like "min-guatentee" yet, so you can't file a bug saying it's a PFE, as there is even no underlying support yet.
IMHO this should just be closed as NOTABUG.
As ajia discussed with Osier in email,it's better to document in virsh manual
to outline "--min-guarantee" is only used by ESX driver.
And also,for -1 value,it's better to document it, because users can't see any output when option --hard-limit, --soft-limit and --swap-hard-limit
So I updated the bug summary.Thanks, Osier and ajia.
Fixed with upstream commit:
Author: Peter Krempa <email@example.com>
Date: Thu Sep 22 12:14:18 2011 +0200
virsh: Improve virsh manual for virsh memtune command
Commit 0a22f54 added --min-guarantee option for the memtune command.
This option is supported only by the ESX hypervisor. This patch adds a
statement about this fact, to prevent user confusion.
This patch also adds explanation how to clear/set to unlimited the
memory tunables. (documments the -1 value).
Verified the bug with libvirt-0.9.9-1.el6.x86_64
# man virsh
memtune domain-id [--hard-limit kilobytes] [--soft-limit kilobytes] [--swap-hard-limit kilobytes]
[--min-guarantee kilobytes] [[--config] [--live] | [--current]]
Allows you to display or set the domain memory parameters. Without flags, the current settings are
displayed; with a flag, the appropriate limit is adjusted if supported by the hypervisor. LXC and
QEMU/KVM support --hard-limit, --soft-limit, and --swap-hard-limit. --min-guarantee is supported only by ESX hypervisor.
The maximum memory the guest can use. The units for this value are kilobytes (i.e. blocks of
The memory limit to enforce during memory contention. The units for this value are kilobytes
(i.e. blocks of 1024 bytes).
The maximum memory plus swap the guest can use. The units for this value are kilobytes (i.e.
blocks of 1024 bytes). This has to be more than hard-limit value provided.
The guaranteed minimum memory allocation for the guest. The units for this value are kilobytes
(i.e. blocks of 1024 bytes).
Specifying -1 as a value for these limits is interpreted as unlimited.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
No Documentation needed
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.