Generate self-signed certificate for the VM.

The VM will swap all the requests to be served via HTTPS.
Enable an HTTPS endpoint in the VM.