Try switching to cloud-init instead of hand coded init stuff.
Some stuff to preload a session in to the vm so that the uploader can just work.