begin to write virtual machine