You have the base virtual machine installed, and then the app just needs to ship the code itself.
You could even ship with an "install script header", like "if this isn't installed, offer to download and install it". I imagine a lot of us have seen these kinds of installers before.