-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RDY] Format domain XML from a file to allow for more flexibility #903
Conversation
39dda54
to
38d48db
Compare
I changed the parameter to accept a string instead as it seems more "nix-like", having an extra file is a bother. |
defn.vcpu, | ||
defn.domain_type | ||
result = defn.domain_tpl.format( | ||
name=self._vm_id(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I tried to replace the memory_size=defn.memory_size,
by **defn
(more elegant) but couldn't succeed.
Allows for maximum flexibility in the definition of the libvirt domain. Also considers the possibility of domain creation failing
I want to use shared folders with libvirt (http://rabexc.org/posts/p9-setup-in-libvirt), if there is any interest I can provide a proper interface EDIT: I guess I can use extra_devices for the shared folders, but to adjust the XML to allow debug a kernel, the PR is still needed |
bump. This should be backwards compatible. |
@rbvermaa what do you think ? |
@@ -53,6 +53,32 @@ in | |||
''; | |||
}; | |||
|
|||
deployment.libvirtd.template = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm confused what's the point of having this as a nixops option ?
What if someone changes this to:
deployment.libvirtd.template = ''
<other template that doesn't use the same variables>
''
That'll basically make it inconsistent with what the python code expects
Hello! Thank you for this PR. In the past several months, some major changes have taken place in
This is all accumulating in to what I hope will be a NixOps 2.0 My hope is that by adding types and more thorough automated testing, However, because of the major changes, it has become likely that this If you would like to see this merge, please bring it up to date with Thank you again for the work you've done here, I am sorry to be Graham |
Related to #883.
The PR adds a deployment.libvirtd.template setting so that users can upload their own domain.xml. They can use a few variables that will be replaced such as {interfaces} (look at domain.xml.in for an example).
I wonder if it wouldn't be best to accept a string instead of a filename ?
I need to test it a bit more.