Ovirt and Vagrant

Anyone using vagrant with oVirt 4.4? I am trying to get the vagrant plugin working with oVirt, but I am experiencing issues. https://github.com/myoung34/vagrant-ovirt4/issues/120 <https://github.com/myoung34/vagrant-ovirt4/issues/120> I wonder what other folks are using or if someone has any suggestions to offer. We are trying to switch from vSphere to oVirt for internal, developer vm's at my office and we have a successful workflow using vagrant-vsphere plugin. Switching to oVirt should have been a simple step, but the issue I an having is a blocker. I built a single hyperconverged server to test with. Everything seems to work fine when I bring up vm's manually in my "cluster." Networking, console, etc all work fine. Ovirt-guest-additions work fine and display the vm's ip in the gui. When I try with the vagrant plugin, there seems to be a communication issue. Even though I can see the vm reporting its IP address fine in the ovirt web gui, it seems like the vagrant plugin is unable to do the same. The maintainer of the code says that he no longer runs oVirt which is why I am reaching out here to see if anyone has a suggestion or even an alternative to suggest. Cheers, Gervais

Thanks for the feedback. Are you using ansible to launch the vm from the template, or to provision the template once it is up? We have 15+ developers bringing up vm's for a variety of different environments (like 80) for different, custom configurations of client environments. Vagrant is really just to stand up (suspend, destroy) the vms and then puppet runs on them to apply custom configuration. I noticed Terraform support. I suspect that it would be a ton of work for us to switch to it. Cheers, Gervais
On Jan 5, 2021, at 12:33 AM, Strahil Nikolov via Users <users@ovirt.org> wrote:
I wonder what other folks are using or if someone has any suggestions to offer.
I'm using Ansible do deploy some stuff from templates. I think that terraform is also used with oVirt, so you can give it a try.
Best Regards, Strahil Nikolov _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/MUM7MMOZTU54HS...

Hi Gervais, Have you checked examples for the ovirt_vm module? https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_vm_mod... Or if you need something more "high level" there is also vm_infra role: https://github.com/oVirt/ovirt-ansible-collection/tree/master/roles/vm_infra Both are provided by oVirt Ansible Collection, which is a preferred and supported solution for automated management of oVirt installations. Regards, Martin On Tue, Jan 5, 2021 at 4:06 PM Gervais de Montbrun <gervais@demontbrun.com> wrote:
Thanks for the feedback. Are you using ansible to launch the vm from the template, or to provision the template once it is up?
We have 15+ developers bringing up vm's for a variety of different environments (like 80) for different, custom configurations of client environments. Vagrant is really just to stand up (suspend, destroy) the vms and then puppet runs on them to apply custom configuration.
I noticed Terraform support. I suspect that it would be a ton of work for us to switch to it.
Cheers, Gervais
On Jan 5, 2021, at 12:33 AM, Strahil Nikolov via Users <users@ovirt.org> wrote:
I wonder what other folks are using or if someone has any suggestions to offer.
I'm using Ansible do deploy some stuff from templates. I think that terraform is also used with oVirt, so you can give it a try.
Best Regards, Strahil Nikolov _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/MUM7MMOZTU54HS...
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/WSBBX7K6MUWA44...
-- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o.

В 10:41 -0400 на 05.01.2021 (вт), Gervais de Montbrun написа: Thanks for the feedback. Are you using ansible to launch the vm from the template, or to provision the template once it is up? I was cloning VMs from a template, but as I'm still on oVirt 4.3 - I cannot use this approach with EL8 (only oVirt 4.4 can seal EL8 Templates). I'm now building VMs and creating snapshots, as I can easily revert back any changes and start new stuff. I think Ansible is the most popular and supported choice for managing oVirt. Yet, I like the idea for Terraform. Best Regards, Strahil Nikolov

On Tue, Jan 5, 2021 at 7:56 PM Strahil Nikolov via Users <users@ovirt.org> wrote:
В 10:41 -0400 на 05.01.2021 (вт), Gervais de Montbrun написа:
Thanks for the feedback. Are you using ansible to launch the vm from the template, or to provision the template once it is up?
I was cloning VMs from a template, but as I'm still on oVirt 4.3 - I cannot use this approach with EL8 (only oVirt 4.4 can seal EL8 Templates). I'm now building VMs and creating snapshots, as I can easily revert back any changes and start new stuff.
I think Ansible is the most popular and supported choice for managing oVirt. Yet, I like the idea for Terraform.
We also have oVirt Terraform provider https://github.com/oVirt/terraform-provider-ovirt It doesn't yet have the coverage of oVirt Ansible Collection, so any contribution is welcome.
Best Regards,
Strahil Nikolov
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/HFM6DESX7CHTCH...
-- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o.

On Mon, Jan 4, 2021 at 8:38 PM Gervais de Montbrun <gervais@demontbrun.com> wrote:
Anyone using vagrant with oVirt 4.4?
I am trying to get the vagrant plugin working with oVirt, but I am experiencing issues. https://github.com/myoung34/vagrant-ovirt4/issues/120 I wonder what other folks are using or if someone has any suggestions to offer.
We are trying to switch from vSphere to oVirt for internal, developer vm's at my office and we have a successful workflow using vagrant-vsphere plugin. Switching to oVirt should have been a simple step, but the issue I an having is a blocker.
I built a single hyperconverged server to test with. Everything seems to work fine when I bring up vm's manually in my "cluster." Networking, console, etc all work fine. Ovirt-guest-additions work fine and display the vm's ip in the gui.
When I try with the vagrant plugin, there seems to be a communication issue. Even though I can see the vm reporting its IP address fine in the ovirt web gui, it seems like the vagrant plugin is unable to do the same. The maintainer of the code says that he no longer runs oVirt which is why I am reaching out here to see if anyone has a suggestion or even an alternative to suggest.
Adding Tomas. I am just guessing that this is related to the migration of functionality from ovirt-guest-agent to qemu-guest-agent. If you want to try fixing this yourself, somehow make vagrant log all the information it gets from oVirt. You'll most likely find the address there, but perhaps not where it's expecting it. Good luck and best regards, -- Didi

Hello Gervais, I have asked our developers who use the plugin and here is the response. Regards, Paul S. Hi Paul, We have had to maintain our own changes to the oVirt Vagrant plugin. Probably we need to start committing to and publishing our own fork. Theres an obtuse and broken long one liner that get's the IP addresses, which has always been a bit problematic, and stopped working altogether with the newest release of oVirt we are using. Anyway, here are the changes we made to get the IP addresses working with the new versions of oVirt: line 58 wait_till_up.rb ip_addr = nil vm_nics_service = server.nics_service nics = vm_nics_service.list nics.each { |nic| puts "Waiting on #{nic.mac.address}" vm_nics_service.nic_service(nic.id).reported_devices_service.list.each { |device| device.ips&.each {|ip| puts "ip: #{ip.to_s}" if ip && ip.version == 'v4' && ip.address ip_addr = ip.address break end } } } Also same in read_ssh.rb: ip_addr = nil vm_nics_service = server.nics_service nics = vm_nics_service.list nics.each { |nic| vm_nics_service.nic_service(nic.id).reported_devices_service.list.each { |device| device.ips&.each {|ip| if ip && ip.version == 'v4' && ip.address ip_addr = ip.address break end } } } Sorry it's not the best way to share code, but feel free to pass this along. Cheers, Cliffe. . ________________________________ From: Gervais de Montbrun <gervais@demontbrun.com> Sent: 04 January 2021 18:14 To: users@ovirt.org <users@ovirt.org> Subject: [ovirt-users] Ovirt and Vagrant Caution External Mail: Do not click any links or open any attachments unless you trust the sender and know that the content is safe. Anyone using vagrant with oVirt 4.4? I am trying to get the vagrant plugin working with oVirt, but I am experiencing issues. https://github.com/myoung34/vagrant-ovirt4/issues/120<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmyoung34%2Fvagrant-ovirt4%2Fissues%2F120&data=04%7C01%7Cp.staniforth%40leedsbeckett.ac.uk%7C2489f8033a8f4f960d4e08d8b0e08d88%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637453825790913752%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zfmBH3M%2BqyVRMPsoXPSSwMONjDS64Mz6nOpFdjiENkc%3D&reserved=0> I wonder what other folks are using or if someone has any suggestions to offer. We are trying to switch from vSphere to oVirt for internal, developer vm's at my office and we have a successful workflow using vagrant-vsphere plugin. Switching to oVirt should have been a simple step, but the issue I an having is a blocker. I built a single hyperconverged server to test with. Everything seems to work fine when I bring up vm's manually in my "cluster." Networking, console, etc all work fine. Ovirt-guest-additions work fine and display the vm's ip in the gui. When I try with the vagrant plugin, there seems to be a communication issue. Even though I can see the vm reporting its IP address fine in the ovirt web gui, it seems like the vagrant plugin is unable to do the same. The maintainer of the code says that he no longer runs oVirt which is why I am reaching out here to see if anyone has a suggestion or even an alternative to suggest. Cheers, Gervais To view the terms under which this email is distributed, please go to:- http://leedsbeckett.ac.uk/disclaimer/email/
participants (5)
-
Gervais de Montbrun
-
Martin Perina
-
Staniforth, Paul
-
Strahil Nikolov
-
Yedidyah Bar David