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:
Install vscode and the “Remote - SSH” extension from Microsoft
Create a new RSA key ssh-keygen -t rsa
Create a cloud-init YAML file named vscode.yaml containing this (replacing with your public key that you generated):
Hi @edbertkwesi, that message means that Multipass could not reach the image servers to download the image. You may have been unlucky and tried to launch when they were down. Have you tried again since then? And did you have a working internet connection?
Hi, is there a way to explicitly indicate a net mask or ip4 range for the vscode.yaml to generate containers available in the local network? …or is there an easy way to bridge to host?
I’m trying to remote connect from a machine in the same network but I’m using 192.168.x.x for my machines, whereas multipass is generating 10.x.x.x ip4 for the container.
Hi @juanqg, in backends that support it, you can use --network option in launch to include other network interfaces in new instances. The simplest use is to automatically bridge to a host network interface that supports bridging, as a way to get an IP in your LAN inside the instance. But you can also configure it manually, for example, to get a static IP.
We’re also working on supporting adding networks to existing instances, which we’ll release in a not too distant future (probably in a couple of releases).
Unfortunately, C:\ProgramData\Multipass\data\ssh-keys\id_rsa is not readable by the Windows user. I got no such identity: C:\\ProgramData\\Multipass\\data\\ssh-keys\\id_rsa: Permission denied error message.