Using Multipass with vscode

Hi everyone, I thought I’d share a blog post I wrote recently about using Multipass as a vscode linux remote development environment. Shout out to @damdam for the idea to use cloud-init to streamline the process!

For those who just want the steps without the whole blog post:

  1. Install vscode and the “Remote - SSH” extension from Microsoft
  2. Create a new RSA key ssh-keygen -t rsa
  3. Create a cloud-init YAML file named vscode.yaml containing this (replacing with your public key that you generated):
  - vscode
  - adduser ubuntu vscode
  - ssh-rsa <public key>
  1. multipass launch --cloud-init vscode.yaml to create the environment with the key
  2. Add the host to vscode by following the prompts and entering the IP address of the instance

Let me know if there are ways you would improve this, or if you have any other thoughts or feedback.

Happy coding!


Next step, implement a VsCode extension to configure and launch Multipass instance with VsCode UI like DevContainers :wink:

1 Like