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

[RFE] Ability to configure various libvirt provisioner parameters #121

Open
br0ziliy opened this issue Aug 29, 2015 · 5 comments
Open

[RFE] Ability to configure various libvirt provisioner parameters #121

br0ziliy opened this issue Aug 29, 2015 · 5 comments

Comments

@br0ziliy
Copy link
Collaborator

This annoys for a long time, time to do something about it :)
I'm using quite some storage pools in my libvirt setup, and I always have to change https://github.com/purpleidea/oh-my-vagrant/blob/master/vagrant/Vagrantfile#L1526 manually to use different storage pools.
Now, I'm thinking of having something like this in omv.yaml:

:provisioner_options:
  :libvirt:
    - driver: kvm
      graphics_type: spice
      video_type: qxl
      connect_via_ssh: false
      username: root
      storage_pool_name: default
  :virtualbox:
    - ...

This is quite big change and before diving deep I'd like to have another opinion if it's worth it to do it like this, or I just have to introduce another variable libvirt_storage_pool and be done with it?

@purpleidea
Copy link
Owner

@br0ziliy Good issue. First is to know why you're changing the storage pool variable. If you can explain, and we can't come up with a better way (to make your life easier) than we'll have to patch the code someway to make your life better.

@br0ziliy
Copy link
Collaborator Author

@purpleidea re: why I'm changing the storage pool -- well, oh-my-vagrant sets it to 'default' by default. 'default' storage pool is basically a directory in /var/lib/libvirt. I'm usually creating another storage pool, which points to a special LVM volume group - and keep my VMs there. In fact, I don't have /var on separate partition on my workstations, and give like 20G for / mountpoint (the rest goes for /home and that vms volume group).

Anyway, I think that storage pool is something that is useful to be customizable in general, thus this RFE.

And as a side note, during the p4h course many folks were having issues with oh-my-vagrant exactly due to the fact the 'default' storage pool was used, and they were running out of space (since they used some external storage for their VMs that was attached to some other storage pool).

Hope this makes it clearer a bit.

@purpleidea
Copy link
Owner

@br0ziliy ACK. Alright, I'm sold.

I'd vote (unless you disagree and want to convince me otherwise - which is fine) for a top level var named :libvirt for the libvirt provider, which takes a dict of keys, one of them being for your storage pool name...

If you do want to add this as a command line arg as well (not a bad idea, but i won't block without it) then I'd recommend --omv-libvirt-whatever-it-is-called...

I don't think that nesting it in a :provisioner_options variable would really help, since we only have libvirt and virtualbox support atm.

How does this sound?

@br0ziliy
Copy link
Collaborator Author

@purpleidea Sounds good. Yeah, on the second though I see I'm trying to overengineer this - let's go as you suggested.
I will see how much time I have next days, and will send you a PR then.

@purpleidea
Copy link
Owner

On Sat, Aug 29, 2015 at 7:51 PM, br0ziliy [email protected] wrote:

@purpleidea https://github.com/purpleidea Sounds good. Yeah, on the
second though I see I'm trying to overengineer this - let's go as you
suggested.
I will see how much time I have next days, and will send you a PR then.

Beautiful! Looking forward to it, Thanks!

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

2 participants