Live data from Hacker News

Developing inside a virtual machine

blog.disintegrator.dev

81–90 of 147 posts

Re: Developing inside a virtual machine

#81
Any benefit of using a VM over docker container here? Since you seem to use the terminal only, without any graphical applications. Containers should be more lightweight and dockerfiles allow quick and reproducible changes to the guest OS.

Re: Developing inside a virtual machine

#82
post #81

Any benefit of using a VM over docker container here? Since you seem to use the terminal only, without any graphical applications. Containers should be more lightweight and dockerfiles allow quick and reproducible changes to the guest OS.

Docker uses virtualization on Macs

Re: Developing inside a virtual machine

#83

We have been developing code inside VMs for over 15 years at my company with various flavors of VMware on the backend and lately more moving to Azure. I assumed this was normal. We reach our VMs via VDI.

I have heard VDI described variously as "an abomination", "unusable except when you absolutely have no other option", and "don't". That might be down to the implementations in play at the time, though.

I most often see this sort of thing where corporate IT can't stomach devs getting root on their own machines. It's a very specific sort of corporate dysfunction.

Re: Developing inside a virtual machine

#84
Curiosity: is anyone here developing inside a VM, with GPU passthrough, and with the monitor directly connected to the GPU used by the VM? (as in: showing the UI of the VM, without any need for RDP or the like)

Such a setup works (I'd know for I have one at home doing just that but it's not my main PC) but how's it like to work like that?

The GPU hooked to the hypervisor can either be on another monitor or on another input (in the latter case you'd "go" to the hypervisor by changing the monitor's input).

Re: Developing inside a virtual machine

#85
post #79
post #63

> I’ve found developers frowning up Ubuntu and preaching for folks to use NixOS, Arch, Debian or other distros. My setup is mostly one VM per project group / online identity. Most of them using Ubuntu. The problem is when I want to work on an old project to check how it likes new technology I tend to stumble into the "you should have kept the OS up to date" problem. Ubuntu does not make it easy to upgrade if you miss…

Don't you get the same problem with upgrades with Debian? As for Wayland, seeing the progress over the last 17 years, I estimate it will be ready for regular use sometime during the 41st millennium.

With debian, is you develop on stable, you only need to do the upgrade song and dance every year and a half or so and upgrades rarely break anything. If you develop on unstable, you can use the snapshot archive to either upgrade 6 months at a time or move back to the next stable and then walk through stable releases.

Re: Developing inside a virtual machine

#86

Author here. Thank you for all the tips. I especially like the idea of using ssh from guest to host to enable pbcopy/pbpaste and open. Now I know what all the WSL users experience seamlessly with their setups. Glad I have something that comes close.

Thanks for the post, an interesting read!

Side note: I checked out your other blog post, and it resonates with my own first post, which I wrote just two days ago: https://fabiendubosson.com/blog/overcoming-perfectionism/. You’re definitely not alone in battling anxiety, perfectionism, and procrastination when it comes to blogging. Keep writing! :)

Re: Developing inside a virtual machine

#87
post #79
post #63

> I’ve found developers frowning up Ubuntu and preaching for folks to use NixOS, Arch, Debian or other distros. My setup is mostly one VM per project group / online identity. Most of them using Ubuntu. The problem is when I want to work on an old project to check how it likes new technology I tend to stumble into the "you should have kept the OS up to date" problem. Ubuntu does not make it easy to upgrade if you miss…

Don't you get the same problem with upgrades with Debian? As for Wayland, seeing the progress over the last 17 years, I estimate it will be ready for regular use sometime during the 41st millennium.

> Don't you get the same problem with upgrades with Debian?

I don't think you have to do some manual configuration to upgrade your distribution because it is a couple years old and current scripts don't support that (like going from a 22.10 to 24.04 is a fun game).

Re: Developing inside a virtual machine

#88

Curiosity: is anyone here developing inside a VM, with GPU passthrough, and with the monitor directly connected to the GPU used by the VM? (as in: showing the UI of the VM, without any need for RDP or the like) Such a setup works (I'd know for I have one at home doing just that but it's not my main PC) but how's it like to work like that? The GPU hooked to the hypervisor can either be on another monitor or on another…

I have a 7800X3D with 64GB Ram, it's overkill for programming

So I've installed proxmox on it to utilize it's resources for other stuff as well

For my personal use, I created an Arch VM with GPU and USB PCIE passthrough, all 3 monitors directly connected to that GPU

It's so seamless and fast that I don't even feel I'm working inside a virtual machine

I have other headless VMs hosted to do other things (opensense etc)

Re: Developing inside a virtual machine

#89

I run my entire work computer inside of a VM. I work from home and have a powerfull desktop i use for my private stuff hooked up to my 3 monitors. My work pc is a vmware vm running inside of vmware pro. I can minimize the work vm and work it out my sight or I can selective choose that the vm should use 1, 2 or 3 monitors and it is easy to switch back and forth between work and private without have any work related da…

I was thinking of doing something similar, especially since work mostly insists on running Windows. Do you use conferencing software or such from the VM? If so, how's the performance?

I did the same thing for many months running teams. It was about what you expect from teams. I didn’t have any other significant issues, but eventually stopped using this setup due to increasing security requirements of the VPN software.

Re: Developing inside a virtual machine

#90
Are most companies this flexible in allowing developers to install whatever they want?

> My physical machine is a 2023 MacBook Pro with M2 Pro CPU

> I’m using VMWare Fusion Pro

> Quite often I’ve found developers frowning up Ubuntu and preaching for folks to use NixOS, Arch, Debian or other distros. The reality for me was Ubuntu was the fastest way to get set up and now

I'm in integrated circuit / semiconductor design. At every big company over the last 30 years we are given a computer and we can change the desktop environment but we aren't installing our own operating system.

The people I know in software have a common OS, compiler, and build environment. They aren't dictating what text editor you use but you aren't working on projects individually but together.

So if everyone at the author's company is doing their own thing do they have problems integrating all the code together? "Oh you used version 2.3.4 but I used version 2.4.7 which fixed this issue, what are we using to ship with?" Or is this not a problem?

Post reply on HN