[PATCH 3/3] docs: update memory setting descripitons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 docs/formatdomain.html.in | 6 +++---
 src/libvirt-domain.c      | 6 +++++-
 tools/virsh.pod           | 6 ++++++
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index b3187bb..fe0b00e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -802,9 +802,9 @@
       <dd>The actual allocation of memory for the guest. This value can
         be less than the maximum allocation, to allow for ballooning
         up the guests memory on the fly. If this is omitted, it defaults
-        to the same value as the <code>memory</code> element.
-        The <code>unit</code> attribute behaves the same as
-        for <code>memory</code>.</dd>
+        to the same value as the <code>memory</code> element. For containers
+        this value is ignored. The <code>unit</code> attribute behaves
+        the same as for <code>memory</code>.</dd>
     </dl>
 
 
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 9491845..fc8818c 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -1833,6 +1833,9 @@ virDomainGetMaxMemory(virDomainPtr domain)
  * or both configurations are changed; for more control, use
  * virDomainSetMemoryFlags().
  *
+ * For containers (domain os type VIR_DOMAIN_OSTYPE_EXE) this is not
+ * maximum but rather amount of physical memory as in virDomainSetMemory.
+ *
  * Returns 0 in case of success and -1 in case of failure.
  */
 int
@@ -1945,7 +1948,8 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
  * modifies persistent setup, while an active domain is hypervisor-dependent
  * on whether just live or both live and persistent state is changed.
  * If VIR_DOMAIN_MEM_MAXIMUM is set, the change affects domain's maximum memory
- * size rather than current memory size.
+ * size rather than current memory size, except for containers (domain os
+ * type is VIR_DOMAIN_OSTYPE_EXE) for which ones this flag is ignored.
  * Not all hypervisors can support all flag combinations.
  *
  * Returns 0 in case of success, -1 in case of failure.
diff --git a/tools/virsh.pod b/tools/virsh.pod
index e830c59..94af367 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2029,6 +2029,9 @@ the value from the host, use the B<virsh memtune> command. In order to view
 the current memory in use and the maximum value allowed to set memory, use
 the B<virsh dominfo> command.
 
+For container guests (LXC, vz containers) total memory (--hard-limit of
+memtune) will be set.
+
 =item B<set-user-password> I<domain> I<user> I<password> [I<--encrypted>]
 
 Set the password for the I<user> account in the guest domain.
@@ -2063,6 +2066,9 @@ up to the nearest kibibyte.  Some hypervisors require a larger granularity
 than KiB, and requests that are not an even multiple will be rounded up.
 For example, vSphere/ESX rounds the parameter up to mebibytes (1024 kibibytes).
 
+For container guests (LXC, vz containers) this will set total memory
+(--hard-limit of memtune) just as B<virsh setmem>.
+
 =item B<memtune> I<domain> [I<--hard-limit> B<size>]
 [I<--soft-limit> B<size>] [I<--swap-hard-limit> B<size>]
 [I<--min-guarantee> B<size>] [[I<--config>] [I<--live>] | [I<--current>]]
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]