Basic functions for scripting vm tasks