mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-01 09:42:45 +00:00
vc: qemu: fix error message on hotplug.
The error message does not provide the max memory that is exceeded. Fix it for better error information. Fixes: #1120 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
d4dd5f1508
commit
a5a74f6d20
@ -1160,7 +1160,7 @@ func (q *qemu) hotplugMemory(memDev *memoryDevice, op operation) (int, error) {
|
||||
if currentMemory+memDev.sizeMB > int(maxMem) {
|
||||
// Fixme: return a typed error
|
||||
return 0, fmt.Errorf("Unable to hotplug %d MiB memory, the SB has %d MiB and the maximum amount is %d MiB",
|
||||
memDev.sizeMB, currentMemory, q.config.MemorySize)
|
||||
memDev.sizeMB, currentMemory, maxMem)
|
||||
}
|
||||
memoryAdded, err := q.hotplugAddMemory(memDev)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user