6 ms·
Running your VMs on another machine is not just good for virtualizing Intel while using an Apple Silicon machine -- it's also awesome just to offload resource u
by kube-system 5y ago
Running your VMs on another machine is not just good for virtualizing Intel while using an Apple Silicon machine -- it's also awesome just to offload resource utilization to another machine. Throw Wireguard on your home network and you can work at the coffee shop all day without plugging in to charge... and you can close your laptop and your long-running tasks keep going.
- 2143 5y agoI'm always paranoid about things catching fire though. I rarely leave anything turned on when I leave the house.
- colordrops 5y agoWhat's your recommended wireguard setup?
- CharlesW 5y agoAs a happy user, I can highly recommend trying Tailscale. https://tailscale.com/kb/1086/tailscale-vs-wireguard/ https://tailscale.com/kb/1086/tailscale-vs-wireguard/
- kube-system 5y agoVanilla WireGuard is not hard to use at all, it's by far the easiest to configure VPN software. Some routers have it built in, and some have packages to install it, and the official GUI clients work well: https://www.wireguard.com/install/ https://www.wireguard.com/install/ If you can't run it on your router, you can just set it up on a linux VM and forward a port as necessary. The configuration file is quite simple once you get the hang of it, you've basically just got: 1. a public/private key that you exchange between connected machines 2. the address of the tunnel, locally 3. the address/port to get to the other end 4. what traffic you want to send over the tunnel
- daemoens 5y agoAn easier method is to just use PiVPN https://www.pivpn.io https://www.pivpn.io. It's much faster to setup and easier to manage with extremely simple commands.
- kube-system 5y agoI've looked at PiVPN, but it looks like more work than many of the packages available for routers. e.g. dd-wrt, pfsense, opnsense all have point-and-click configuration pages.
- EricE 5y agoNot at all. Maybe three terminal commands tops to configure and add a user for yourself. Once the text config file is generated just import it on your client and you are done. As long as you have forwarded the appropriate port through your firewall that's literally all it is to it. Of course if you have a firewall with it built in, then use that. However for pfSense and OpnSense wireguard runs in user mode and not the kernel, so depending on your traffic the pi may be faster since wireguard is compiled into the kernel with piVPN. Which can cause fun issues if there is a kernel update you aren't prepared for - was my only real problem with piVPN/Wireguard but it wasn't too hard to recover once I figured out what was going on :)
- artificialLimbs 5y agoI'm not sure how this is possible. With pivpn: install pivpn, open router port & forward (automatically configured and optionally changed during setup), type 'pivpn add' at the command line for every device I want. Copy the outputted config files to device and import into wg client. Done.
- viraptor 5y agoZeroTier is even easier. 1. Install the package, 2. zerotier-cli join (your network id), 3. Flip the new node state to enabled in the control panel. No other config need unless you want specific network config/filters.
- 1MachineElf 5y agoYou might want to look into Tailscale if you're just starting out. Configure a small VM to act as a Tailscale subnet router for whatever network your macOS VMs are on, after which you will be ready to access them remotely from the coffee shop. If you prefer to have access to ESXi from a separate VLAN/network, then get the Pro plan and setup a 2nd subnet router for your hypervisor, NAS, etc.
- artificialLimbs 5y ago1.) Install wireguard. 2.) Install pivpn. 3.) (Optional) Modify makeCONF.sh/removeCONF.sh if needed.
- copperx 5y agoI use ZeroTier for that use case. Is Wireguard similar?
- cassianoleal 5y agoZeroTier does a lot more for you than pure Wireguard. OTOH, Wireguard tends to have a lot more bandwidth than ZT in my experience. If you want a similar product to ZeroTier but one that uses Wireguard under the hood, Tailscale is what I've been using to connect to my home network.
- artificialLimbs 5y agoLast I used ZT, it was pretty flaky on Windows. Network would just stop working sometimes, client would bug out and I would have to uninstall/reinstall. Slow speeds also; wireguard is much faster.
- Shakahs 5y agoExcept now you require 2 machines and internet access instead of just one machine. You could offload your VMs before too. Keeping them all local and working offline are still important capabilities.
- kube-system 5y agoThat depends on your use case, of course. I'm not going to be working offline at a coffee shop anyway.
- apatheticonion 5y agoThose cases are few and far between for me - usually limited to catching flights and my laptop can be used locally as a back up. You can also dockerize your workloads and use an environment variable to use your ssh remote as the docker machine. Catching a train home from the office and using a lightweight, cool to the touch, thin laptop that is offloading commands via 4g to my desktop PC with 24 cores such that I can't tell that workloads are not running locally is such a fantastic development experience. Sure I need to be always online on 1 extra device, but the second connection can be significantly lower bandwidth while the server will access things over a hardwired 100 megabit connection.
- systemvoltage 5y agoAll this is fine and dandy if you don't care about keyboard latency and writing code. If you're running a large workload, this is the way to go. However, using a VM to write code is just painful.
- kube-system 5y agoI don't write the code in a VM, I just run the code in a VM. It depends on your development stack, but many stacks have options for running code on remote machines. For example, you can configure a Docker context running on another machine. docker context create remote ‐‐docker “host=ssh://user@remotemachine”
- systemvoltage 5y agoYes, PyCharm also has remote options. But I see a lot of people writing code on remote machines. A good keyboard + baremetal FreeBSD (no GUI) machine is an absolute pleasure to write code on.
- cyberpunk 5y agoAt 80x25 or are you doing some 'mad tricks' with your kernconf to get it higher res? Got a diff on /usr/src/sys/amd64/conf/GENERIC (or whatever you call yours)?
- cyberpunk 5y agomosh + tmux makes this largely a non-issue. (source: I've spent the last 5 years working primarily on a physical server in a proper dc and just connecting into it from thin/fanless laptops)
- seabrookmx 5y agoTry the VSCode remote SSH extension. You'll often forget that you're actually editing on a remote machine. The interactive debugger works and everything.
- 5y ago
- digitallyfree 5y agoDid this in university, where I carried a lightweight disposable laptop and had a desktop workstation (and later a server) at home. I used OpenVPN to remote in and got to smirk at the students who either had slow builds, a heavy gaming laptop, or had the money for a top-line MBP or similar. Due to the slow upload speed of my DSL connection, this forced me to become comfortable with TUI apps and a multiplixed terminal environment, with the occassional use of Xpra when absolutely necessary.
- DwnVoteHoneyPot 5y agoIf you like MacOS, that is the most affordable performace too. I minimize the Apple premium cost by buying an Macbook Air, then have custom build PC at home. Add all the CPU, GPU and storage space at home. Also allows gaming when I want.
- binkHN 5y agoI’ve been doing this for many years now—happiness is not keeping one or more beasts of machines in my backpack—and I still do this over SSH tunnels (maybe I should finally migrate to the WireGuard hotness).
- smackeyacky 5y agoI was doing a lot of work with SSH tunnels, but it seems Tailscale is an easy way into WireGuard. For now I just have one node running on my office setup to access everything there and it seems to work pretty well from home. More convenient than mapping ports anyway. Although...I don't quite grok how it might be more secure than something like certificate based SSH, seems like the Tailscale attack surface might be bigger even though you can go back and close off the firewall stuff that allows SSH to work. Would seem that instead of concentrating on breaking your (probably obscure) public IP address / port combo, an attacker would simply go to Tailscale and attack that instead.
- hoherd 5y agoIt sounds like you and I have a similar setup. I recently set up WireGuard using the linuxserver/wireguard image, and although it was really easy (took ~5 minutes to grok and get running) and is useful for my phone to get pihole dns from my home network, I don't think I get any benefits when using wireguard on my laptop vs just using sshuttle, which doesn't require any extra software at home.
- apatheticonion 5y ago+1 I have been doing this for over a year now. Great workflow and tools like VSCode SSH extension make it appear that everything is happening locally.