I currently have a 24/7 linux old-office-PC-turned-server for self-hosting, and a desktop for mostly programming and playing games (linux as a host + a windows VM with a passed-through GPU). The server’s i5-3330 is usually at ~10-15% usage.

Here’s the actual idea: what if, instead of having a separate server and desktop, I had one beefy computer that’d run 24/7 acting as a server and just spun up a linux or windows VM when I needed a desktop? GPUs and USB stuff would be passed through, and I could buy a PCIe SATA or NVMe controller I could also passthrough to not have to worry about virtualized disk overhead.

I’m almost certain I could make this work, but I wonder if it’s even worth it - would it consume less power? What about damage to the components from staying powered 24/7? It’d certainly be faster accessing a NAS without the whole “Network-Attached” part, and powering on the desktop for remote access could just be a command over SSH instead of some convoluted remote WoL that I haven’t bothered setting up yet.

I’d love to hear your thoughts on this.

Edit 2 months later: Just bought a 7950X3D and use the 3D V-cache half of it as a virtualized desktop with the other cores used for running the host and other VMs. Works perfectly when passing through a dedicated GPU, but iGPU passthrough is very difficult if not impossible since I couldn’t manage it.

Edit even later-er: iGPU passthrough is possible on ryzen 7000 after all, everything works great now.

  • huquad@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Definitely possible! But as the other commenter’s have pointed out, there are some costs/tradeoffs to be aware of. I’ll start by answering your questions. Power consumption could technically be less sharing a system due to less overhead (only one mobo, ram, etc), but power is mostly CPU/GPU, so I don’t think you’d see a huge difference. Furthermore, always on VM vs sleeping/turning off when you’re not using it should have marginal effects. Another commenter mentioned it, but always on isn’t a problem. Sustained elevated drive temperatures can be an issue, but really you’re looking at elevated CPU/GPU temps which won’t be an issue. The bigger issue is temperature cycling, but even then consumer hardware is derated to last 10-20 years as long as you aren’t doing overvoltage and you keep up with periodic repaste/repadding (every 5 years or so is typically recommended). Finally for turning on your VM, I’d recommend just leaving it on. Alternatively, you could send an ssh command as you stated.

    Having a a hypervisor server with VMs is very common and well documented if you only want VNC/ssh. Regardless, any server maintenance/reboots will also obviously disrupt the desktop. Additionally, VNC doesn’t support audio. I believe Windows remote desktop has audio, but I’m not sure about quality.

    To get improved video/audio, you’ll need a GPU. Once you add a GPU, things get trickier. First, your host/server will try to use the GPU. There are ways to force the host to not use the GPU, but that can be tricky. Alternatively, you can look into VFIO which hands off the GPU to the VM when turned on. However, this is even trickier. Last, you can install two GPUs (or use iGPU/APU if applicable). Then you can pass the GPU through. Last I looked, NVIDIA and AMD are both possible options and this is now easier than ever. Regardless, if you plan on gaming, you should know some games will block you for playing in a VM (specifically games with anticheat). All that said, desktop/server has some drawbacks, but is still a great option. Your next step is choosing your hypervisor.