It happened sometimes, not always. Whenever I try to do ‘sudo apt-get dist-upgrade’ in Gateway commandline mode (RAM=128MB), VM occasionally freezes and not respond to any input. From my observation, it usually happens when it reaches ‘Setting up linux-image-xxxxx’ or ‘Setting up locales’.
To temporarily fix this I need to force close the Gateway and restart with GUI mode. Do ‘sudo dpkg --audit’ and ‘sudo dpkg --reconfigure -a’ and the upgrade will go smooth.