Hacker News new | ask | show | jobs
by rphln 1808 days ago
Out of curiosity, have you experimented with accessing the VM through SSH? If so, what was it like?

I could see myself using a similar setup down the line, but having two graphical environments seems like it'd be somewhat distracting or fussy.

1 comments

I do a similar setup to this on Windows (WSL) and previously on a Mac (Parallels + Ubuntu). In both cases it's exclusively SSH access using an outer-system terminal, and as far as editors, a mix of screen/vim/whatever in the terminal, and VSCode with remote editing.
Would it be possible as an alternative to remote editing to use the VM's "Shared folder" functionality? Running an heavy IDE like IntelliJ inside a VM when you could also run it in the outer OS seems like stretching this setup beyond what is meant for.
When I tried something like this, write heavy activities were pretty slow. Extreme example was running something like "npm install" (write many small files) on the host. That took about 10x time compared to doing it in WSL. I've had similar slow performance with shared folders in things like Vagrant.

Disclaimer: I did this 2-ish years ago, it may have changed by now.

Why run npm on the wrong OS? It can easily break building a binary for a wrong platform.
Not sure exactly what the situation was here, but if it was an NTFS folder from Windows shared into the VM/WSL, then you are indeed running the npm operation in the inner system but paying the cost of writing thousands of tiny files across that translation layer.
I experimented with this but eventually gave up. The folder was natively the outer system's filesystem and "shared" inward, and that means things like non-case-sensitivity on Mac or lack of proper permissions on Windows, not to mention the extra sharing overhead whenever running a build or whatever.
By "gave up", do you mean the shared-folder idea, or the whole thing, i.e. using a Linux VM for dev from a Mac / Windows host? I'm seriously pondering not having to deal with re-installing my dev environment on the Mac because even with Homebrew and rbenv and such tools, dependency hell is around every corner.\
Gave up on the shared folder thing and contented myself with the whole toolchain being in the inner system.