Live data from Hacker News

Scripts for Streamlining Your Homelab with Proxmox VE

tteck.github.io

81–90 of 113 posts

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#81
post #6

If anyone is looking at proxmox, running these scripts from the host will speed up experimenting. It’s great to have something up and running in minutes to only redo it slightly differently. If you are considering two proxmox hosts ensure the second one added to the cluster is an empty proxmox host, and the proxmox cluster from the first box will assign unique id’s to all containers on any host.

Also, for homelabbing, there's a magic incantation that allows you to configure Proxmox away from the default High Availability cluster mode. By default, the HA mode insists that all nodes are up or others won't come up, making this tweak (it may be contained in the OP scripts, I don't recall) allows you to retain many of the benefits of having Proxmox machines "connected", without requiring you treat them like a HA…

Would this work for having proxmox modes across multiple datacenters? IIRC it was sensitive to latency

I don't really use the HA features of proxmox that often, mostly just for migrating vms across hosts. But I had been thinking of re-installing some of my remote servers with proxmox and hooking them up to the same cluster so that I could potentially shut off all of the servers in my basement and run everything from a remote location, then migrate the vms back later.

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#82
post #60

Earlier quoted context omitted.

Can someone explain why it is useful to do do virtualization at all when you just want to run a small amount of things like this? I have a ubuntu server install running on an old laptop to do very basic background jobs, backups, automation, run some containers etc. – am I missing something by not using a hypervisor? What are the benefits?

Some software really prefers to control the whole host, usually highly integrated stuff. Some examples: - Unifi Controller installs like a half dozen dependencies to run (Mongo, Redis, etc last time I used it), much easier to isolate all that in a VM - Home Assistant's preferable and most blessed install method is Home Assistant OS, which is an entire distribution. I've run HA in Docker myself before but the experien…

HomeAssistant also does some voodoo with Bluetooth, wifi, ipv6 and mDns for IOT devices. For this reason it seems best suited to a host machine instead of a docker container.

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#83
post #77
post #75

Earlier quoted context omitted.

Sorry again, is this like nVidia MIG? That seems to be the more current technology. Not sure if the host can retain a slice though.

Kind of, i'm not to familiar with the enterprise gpu sharing, but I believe that requires hardware support for it on the GPU to split up contexts for the OS. Whereas the GPU-P solution works on any GPU and is vendor agnostic as it's done on the OS/Processor level. It's really cool and I have no idea how they can ship this since it does trample on the enterprise tech pretty substantially. But I belive it's a byproduct…

Thanks for the knowledge share!

MIG does need hardware suppoet, and from what I understand really expensive licensing. I don't know if AMD has a parallel technology.

That is pretty cool that it is vendor agnostic. I've found a few docs from a few years ago talking about stuff like it on Linux, but development of it seems to have stopped or just not progressed at all.

But she is they would use it in Azure, I imagine there they are using enterprise GPUs. But in Andheri scale datacenters it definitely sounds like an advantage!

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#84
post #80

Earlier quoted context omitted.

yes, but come on: you download it and quickly check yourself

Assuming that the script you download is the same as the script that curl|bash downloads. https://web.archive.org/web/20231128113854/https://www.idont...

A neat attack, but probably unrealistic in the context of those downloads being on github.

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#85

The actual scripts: https://github.com/tteck/Proxmox After poking at a couple of these, they seem like they're 50% shiny packaging and 50% one-liner bash commands.

I think the balance is closer to 80% shiny, 20% working code.

There's definitely some cool stuff here (disabling the nag screen, thank you!) but I really dislike the way it's presented.

I don't like the curl|bash very much, but mostly I think this would be far more interesting as a collection of one-liners to accomplish each task vs the current form of a curl|bash with dialogs and prompts. I think that's better for security and better for learning you should know what commands you're executing!

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#86

Earlier quoted context omitted.

Although its supported, its not well documented enough to be a good way to learn about cloud-init in my experience. I tried configuring a K3's cluster across three proxmox nodes via cloud-init to get some exposure to it and eventually gave up and just configured them manually

I had the same issue at the beginning, and unfortunately stopped on it for over a year: then I went back and got it and now I cannot think of provisioning a VM by hand anymore Have a look at this script for example https://github.com/francescor/swarm/blob/main/create_swarm_v... which is the "proxmox" side of cloud-init, that then load an ordinary cloud-init https://github.com/francescor/swarm/blob/main/cloud-init/clo…

lol (looking at cloud init for ubuntu 22...)

  ...
  # remove snapd trash
  - snap remove lxd
  - snap remove core20
  - snap remove snapd
  - systemctl stop snapd.service
  - systemctl stop snapd.socket
  - systemctl stop snapd.seeded.service
  - systemctl disable snapd.service
  - systemctl disable snapd.socket
  - systemctl disable snapd.seeded.service
  - systemctl stop snapd.service
  - systemctl stop snapd.socket
  - systemctl stop snapd.seeded.service
  - rm -rf /var/cache/snapd/
  - apt autoremove --purge snapd -y
  - rm -rf /root/snap
  # remove apport trash
  ...

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#87
post #78

I don't see anything on cloud-init (did I miss some link?) while it works perfectly in Proxmox, see https://pve.proxmox.com/wiki/Cloud-Init_Support

It works, but anytime you have custom networking or more complex cloud-init configs, you'll have to go into "snippets" territory or referring to files in a local filesystem of the host. They don't have API support for making snippets the last time I checked. Where I ran into this was when trying to set up hosts with Terraform on Proxmox VE (which works well itself too).

The best way to handle this (which is really terrible, honestly, but it works) is to make configdrive2 ISOs locally, and upload those using the API. That is, don't give Proxmox a cloud-init snippet, but rather a fully-built cloud-init ISO. This is basically bypassing/reimplementing Proxmox's cloud-init features yourself, which is terrible. But it works really well.

There's a pretty neat Proxmox API library written in Go that can do this all for you: https://github.com/luthermonson/go-proxmox

There's a Terraform plugin planned, as well. Not sure what the status on it is, currently.

I also am slowly working on my own Proxmox CLI, consuming the go-proxmox library: https://github.com/perchnet/gomox

But unfortunately I don't have much software engineering experience, so it's a very slow process... :)

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#88

Earlier quoted context omitted.

Some software really prefers to control the whole host, usually highly integrated stuff. Some examples: - Unifi Controller installs like a half dozen dependencies to run (Mongo, Redis, etc last time I used it), much easier to isolate all that in a VM - Home Assistant's preferable and most blessed install method is Home Assistant OS, which is an entire distribution. I've run HA in Docker myself before but the experien…

HomeAssistant also does some voodoo with Bluetooth, wifi, ipv6 and mDns for IOT devices. For this reason it seems best suited to a host machine instead of a docker container.

[deleted]

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#89

Earlier quoted context omitted.

Most of homelabbing is this. it's an outlet to play. unixporn, neofetch, pretty dashboards to link to all of your content pirating tools, etc.

This this a negative or a positive? And more broadly, a lot of software could be summarised as a pretty packaging of a basic tool.

It really depends on your perspective and what you want out of a homelab. If you want to tinker with servers as a hobby it's a huge plus.

If you want things to Just Work, this is probably not for you

Re: Scripts for Streamlining Your Homelab with Proxmox VE

#90
post #27

Earlier quoted context omitted.

Why? I find having a single capable hypervisor hosting VMs far more reliable than a bunch of smaller machines.

Maybe running a firewall on dedicated hardware so the internet doesn't drop if you reboot the hypervisor.. but even then I just live with that and run pfSense in proxmox.

Excellent point! I do run my main PiHole in a VM, but I have a second PiHole running on an RPi just in case I'm rebooting the hypervisor. DNS is the only real dependency that can cause problems for me when the hypervisor reboots for updates. I'm just running Fedora on a somewhat recent Dell rack server.

Firewall is a great example of what not to run on a vm, at least for me! I consider gateways as appliances though, and I haven't run my own router on Linux since I first got Cable internet in 2002. I remember how awesome it was compared to the weak routers available at the time!

Now I just buy a UDM Pro and forget about it!

Post reply on HN