Feilong is a open source z/VM cloud connector project under the Open Mainframe Project umbrella that will accelerate the z/VM adoption, extending its ecosystem and its user experience. It provides a set of APIs to operate z/VM including guest, image, network, volume etc.
Current code caculates an active VM's memory with the Total online memory value of lsmem command output when doing live resize.
This value is in Gigabytes, and is not precise to 2 digits, for example, lsmem should be reporting 2.75G, but instead it reports 2.8G; when target memory is 4G, then the to-be-increased memory is caculated to 1.2G, which is not aligned to 256M, then causes resize to fail.
To fix this problem, change to use the lsmem -b output, as it is in Bytes, so it is precise value, and always be aligned to 256M.
Current code caculates an active VM's memory with the Total online memory value of
lsmem
command output when doing live resize.This value is in Gigabytes, and is not precise to 2 digits, for example, lsmem should be reporting 2.75G, but instead it reports 2.8G; when target memory is 4G, then the to-be-increased memory is caculated to 1.2G, which is not aligned to 256M, then causes resize to fail.
To fix this problem, change to use the
lsmem -b
output, as it is in Bytes, so it is precise value, and always be aligned to 256M.