Foreman uses this library to do libvirt management and XML files are hardcoded in there:
Feel free to edit those templates there, or add a parameter to the API which allows you to do what you need.
Sidenote: We do not recommend using libvirt for production use, use oVirt (which is based on libvirt but scalable) or other platforms like VMWare instead.
I’m probably missing something here, but afaict, there is only one(!) server.xml.erb under …/templates/.
I can’t see how to produce and access another version.
(I’ve only ever used Foreman; never tried to alter it)
As above, we only have one Foreman setup and we need to be able to add this change
One more recommendtation, we put most resources into oVirt integration, that’s basically libvirt with API and UI. Take a look if you can deploy that instead, we do not recommend libvirt for production use, you can’t do many enterprise things without serious effort (e.g. live migrations etc).
I suspect that Feature #2308: Expose interface to "Copy Host CPU configuration" - Foreman actually solves your need but you’re on an ancient 1.14 installation. I’d start with updating and see if you still have the same problem. The ticket/code suggests 1.21 has the feature but I’d suggest a supported version (1.24 / 2.0 right now).
That’s what I was trying to avoid , hence the qn.
This is for a fleet of commercial systems (~ 2000) so i really wanted to test it selectively first.
However, it looks like we are going to go for it…
oVirt: We may look into that.
The request I had was just about the cpu rand thing, but as it happens we are looking to do a major upgrade to v2.0 anyway - I’m probably going to be working with the guy in charge of that proj.
ekohl : That sounds interesting, but having looked at that link, i don’t see how that would be exposed on the GUI
To either of you (or anyone):
Apparently the last time someone tried to upgrade us past foreman v1.14.3, it had trouble talking to libvirt on Centos 6.
Is that a known issue? Have you got any info/tips?
(Yes, we are looking to replace all C6 systems, but that’s non-trivial in a large commercial setup)
Honestly, you are not the first one asking for this, but the way fog is designed editing full ERB would probably be tought to implement. What you can actually do pretty well is add a new flag into fog that sets the value you need and modify ERB to do that. Or if you really need brand new template, add a flag called “base template” or whatever which selects one of predefined. But I would suggest rather sticking with one template and extending it.
With so many VMs, I wonder how you do things like live migrations, shared storage or networking. This can be tricky to do with libvirt, you are on your own. oVirt can handle this for you pretty well.
We probably haven’t fixed that, you need to test. I remember one bug I was working in that regard but cannot find it on our Redmine.
I am not surprised - it did seem a bit odd you can’t (easily) have different HW “options” (aka templates).
Otoh, it is the sort of thing that is best designed-in early on, not hacked on later.