Skip to content
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

VM/Template Hooks #92

Open
aglitke opened this issue Aug 14, 2013 · 3 comments
Open

VM/Template Hooks #92

aglitke opened this issue Aug 14, 2013 · 3 comments
Labels
Milestone

Comments

@aglitke
Copy link
Member

aglitke commented Aug 14, 2013

Today kimchi creates vm definitions automatically based on a small number of customizable parameters. This provides an easy to use solution that gets things right most of the time. Advanced users may want to customize the libvirt domain xml of their VMs to enable a feature not yet supported by kimchi or for some other reason.

VM/Template hooks are python scripts that would be installed by the host administrator into a special hooks directory. They could be enabled by a special section in the VM/Template json. A Template hook for create would be run after the xml is created but before it is sent to libvirt. A hook script would receive the json object and a copy of the generated xml. The script must return the desired xml back to kimchi. This allows the hook script to add/modify devices and perform other customizations to the config before it is created.

@bingbu
Copy link

bingbu commented Aug 15, 2013

May I take this?

@sming56
Copy link

sming56 commented Aug 15, 2013

"A hook script would receive the json object and a copy of the generated xml". I think the json object are the additional parameters from the VM create interfaces. Right? Bingbu post a patch to modify the XML file before not merged yet, I think we can leverage the patch now.

@ghost ghost assigned bingbu Aug 16, 2013
@aglitke
Copy link
Member Author

aglitke commented Aug 16, 2013

Go ahead Bing Bu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants