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

Support for roboxes/generic boxes #118

Open
abbbi opened this issue Oct 16, 2020 · 4 comments
Open

Support for roboxes/generic boxes #118

abbbi opened this issue Oct 16, 2020 · 4 comments

Comments

@abbbi
Copy link

abbbi commented Oct 16, 2020

hi there,

i mainly using vagrant with the libvirt provider. There is a big variety of operating systems available, created by the
roboxes project (https://github.com/lavabit/robox). Maybe it would make sense to have support for these boxes
in the ovirt4 provider too? They should meet all requirements as they work on plain libvirt nicely (but are missing cloud-init).

This would make it easier to use existing boxes, and not having to use a dummy box with templates ..

@myoung34
Copy link
Owner

myoung34 commented Oct 19, 2020

If you can find a way to shim them into the build i'd be happy to merge a PR, assuming they work as expected

@abbbi
Copy link
Author

abbbi commented Oct 20, 2020

So as i quick test i did the following:

  1. Downloaded vagrant box generic/centos8
  2. uploaded the boxes image as disk to RHV 4.4
  3. Made a template
  4. Spinned up a VM from the template using vagrant-ovirt4, booted nicely, network configuration however failed.

The generic libvirt boxes depend on an internal libvirt management network and are by default configured
to use DHCP on the first network interface to be reachable by the vagrant provisioner. The deployment
flow is as follows:

  1. vagrant checks if the box image exists in the libvirt volume
  2. if not, uploads the box image to the volume
  3. creates a new virtual machine based on a snapshot (would be template, in ovirt), assigns virtual
    machine to libvirt netwok with DHCP running
  4. spins up virtual machine, waits until virtual machine receives IP from DHCP service
  5. Runs provisioning steps on VM.

I think the one way one would get the same behavior with the ovirt4 provider is to have an external
network on the ovirt system using the OVN provider:

https://github.com/oVirt/ovirt-provider-ovn

which seems to have the feature to create networks with DHCP enabled, So provision with the vagrant-ovirt4
would be:

  1. vagrant-ovirt4 checks if the generic/* image is available in the configured storage
  2. if not, uploads the image and defines it as template
  3. clones new VM from template, assigns OVN network to it
  4. vm boots, receives IP via DHCP
  5. provisioning scripts run..

@myoung34
Copy link
Owner

Is there anything actionable here? Im still unsure about this:

vagrant-ovirt4 checks if the generic/* image is available in the configured storage

Im not familiar with this functionality being in the provider itself. Is it inherited in the provider? Or is this on the ovirt server itself?

@abbbi
Copy link
Author

abbbi commented Jan 11, 2021

Is there anything actionable here? Im still unsure about this:

vagrant-ovirt4 checks if the generic/* image is available in the configured storage

Im not familiar with this functionality being in the provider itself. Is it inherited in the provider? Or is this on the ovirt server itself?

vagrant-libvirt for example checks if the base image configured in the Vagrantfile is available in the local storage where
the virtual machine is provisioned. If not, it downloads the base image and uploads it to a storage volume, in order to
clone the vagrant cow vm snapshot from it.

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

No branches or pull requests

2 participants