It's already heavy and slow in a native OS, adding a VM on top would make it even slower.
Does Virtual Box work under Chrome OS? In that case, just try downloading an Ubuntu vdi and installing CubeMX on it.
CubeIDE is Eclipse-based, there're some tutorials to install it on Chrome os.