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

autostart support for servers #7

Closed
plribeiro3000 opened this issue Aug 2, 2015 · 9 comments
Closed

autostart support for servers #7

plribeiro3000 opened this issue Aug 2, 2015 · 9 comments

Comments

@plribeiro3000
Copy link
Member

Hi,

There is an autostart attribute in the server model for libvirt. However, I don't see where this attribute could be enabled when creating a VM. I don't know libvirt's API, but it seems there's a separate method to call when enabling autostart.

Is it currently possible to enable autostart when creating a VM with fog? If so, how? If not, would it be possible to add it?

Thank you.

Original issue opened by @eolamey at fog/fog#3343

cc/ @eolamey @geemus

@ghost
Copy link

ghost commented Aug 6, 2015

Hi,

I am no longer needing this, should this issue be closed?

@plribeiro3000
Copy link
Member Author

Hey @eolamey. Thank you for the feedback but i believe those issues could live here a little longer. Now that we have a small repository it should be easier to add those features. =)

Thanks!

@apatelKmd
Copy link

apatelKmd commented Apr 5, 2020

Hey, @plribeiro3000 Is the issue planned for the near future? I use KVM on CentOS 7 and 8 and the missing auto start option will greatly enhance my setup.

@plribeiro3000
Copy link
Member Author

plribeiro3000 commented Apr 5, 2020

@apatelKmd would you be able to open a PR ?

@apatelKmd
Copy link

@plribeiro3000 Thanks for getting back. I am new to the project and willing to learn and contribute. I have consulted the CONTRIBUTION.md and the source code.
I see that the :autostart as an attribute of the server.rb file but not used anywhere else.

Further investigation of ruby-libvirt-0.7.1/ext/libvirt/domain.c reveals methods exposed by the library.

I am having trouble with the starting point and need help. Review of the file CONTRIUBTION.md did not help me with a starting point. Do I need to work with the model or request? If the model, is it the server object or the node object?

This is what I am thinking I need to implement.

Query if the domain is set to autostart.
Enable/Disable the domain to autostart based on the boolean value provided.

@geemus
Copy link
Member

geemus commented Apr 6, 2020

Querying the domain for an autostart value sounds like a request. And then checking the boolean and making the appropriate call sounds like something for the model. I'm not at all familiar with libvirt though. Does that help point you in the general direction?

@plribeiro3000
Copy link
Member Author

@apatelKmd Its just like @geemus said.
The calls to libvirt-ruby should be encalsulated in a request together with parsing the response and generating the parameters.

Any other logic should fall in a model.

@apatelKmd
Copy link

Awesome, I think your inputs are helpful.

@apatelKmd
Copy link

FYI, @geemus and @plribeiro3000 I have opened a pull request to receive early feedback. #73

@geemus geemus closed this as completed in d6af037 Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants