[PATCH 1/2] conf: Add the size of failed max_memory in error

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

 



If virDomainDefCompatibleDevice fails because there is insufficient
domain def->mem.max_memory, then let's also print out that value in
the error message.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b70dca6c61..2a17214f38 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -28901,7 +28901,8 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
         if ((virDomainDefGetMemoryTotal(def) + sz) > def->mem.max_memory) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("Attaching memory device with size '%llu' would "
-                             "exceed domain's maxMemory config"), sz);
+                             "exceed domain's maxMemory config size '%llu'"),
+                           sz, def->mem.max_memory);
             return -1;
         }
     }
-- 
2.17.2

--
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]

  Powered by Linux