vm: use options objects, and document vm2's changes

On top of #6117. See commit messages for more details.