From @ulfaric:
The RAM issue always happens whenever you use a random function to generate RAM usage. The RAM usage of that VM will simply keeps as the last randomly generated value and doesn't change back to 0. If this is the last cloudlet to be scheduled on the VM.
My fix is simply add a never ending Cloudlet(using the on finish listener to put a new same Cloudlet back on to the VM) for each VM. Because I am simulating containers which must have a process that is always running. So this "deamon" cloudlet fixes the issue because it overwrites the incorrect RAM usage at the end.
From @ulfaric:
The RAM issue always happens whenever you use a random function to generate RAM usage. The RAM usage of that VM will simply keeps as the last randomly generated value and doesn't change back to 0. If this is the last cloudlet to be scheduled on the VM.
My fix is simply add a never ending Cloudlet(using the on finish listener to put a new same Cloudlet back on to the VM) for each VM. Because I am simulating containers which must have a process that is always running. So this "deamon" cloudlet fixes the issue because it overwrites the incorrect RAM usage at the end.