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

[FEATURE REQUEST] salt.states.virt: support autostart for VMs #60700

Closed
dseomn opened this issue Aug 10, 2021 · 7 comments
Closed

[FEATURE REQUEST] salt.states.virt: support autostart for VMs #60700

dseomn opened this issue Aug 10, 2021 · 7 comments
Labels
effort-xmall level of effort estimated in size Feature new functionality including changes to functionality and code refactors, etc. good first issue good for someone new to salt
Milestone

Comments

@dseomn
Copy link
Contributor

dseomn commented Aug 10, 2021

Describe the solution you'd like
It would be nice to have a way to control whether a VM starts on boot or not. Maybe a new autostart option to salt.states.virt.running and/or salt.states.virt.defined? Or maybe a new function?

Describe alternatives you've considered
I'll probably use salt.modules.virt.set_autostart for now.

@dseomn dseomn added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Aug 10, 2021
@garethgreenaway garethgreenaway added this to the Approved milestone Aug 24, 2021
@garethgreenaway
Copy link
Contributor

@cbosdo FYI.

@cbosdo cbosdo added effort-xmall level of effort estimated in size good first issue good for someone new to salt labels Aug 25, 2021
@cbosdo
Copy link
Contributor

cbosdo commented Aug 25, 2021

@dseomn Thanks for the feature request: after 7 years working on and with libvirt I wasn't aware we could autostart domains!

Since the virt module already has the function for it, it just means adding the feature on the virt.running state. I would be happy to help you work on such a simple change!

@XelK
Copy link
Contributor

XelK commented Feb 24, 2022

@cbosdo Hello, does this still relevant? Can I try to implement this?

@cbosdo
Copy link
Contributor

cbosdo commented Feb 24, 2022

@cbosdo Hello, does this still relevant? Can I try to implement this?

Yes it's still relevant. The functions to change are virt.defined() and virt.running() in https://github.com/saltstack/salt/blob/master/salt/states/virt.py. You just need to use the virt.set_autostart() module function in those. I would happily review your PR!

XelK added a commit to XelK/salt that referenced this issue Feb 26, 2022
@bryceml bryceml removed their assignment Feb 28, 2022
@XelK
Copy link
Contributor

XelK commented Mar 7, 2022

Hi @cbosdo could you please check my PR #61735

@gidoBOSSftw5731
Copy link

Is this feature implemented yet? And also, is it implemented for virsh networks as well?

@cbosdo
Copy link
Contributor

cbosdo commented Dec 8, 2022

Yes it's implemented for domains and networks. I'll close the issue, thanks for the heads up

@cbosdo cbosdo closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-xmall level of effort estimated in size Feature new functionality including changes to functionality and code refactors, etc. good first issue good for someone new to salt
Projects
None yet
Development

No branches or pull requests

6 participants