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

Add Libvirt to the Vagrant config file #1490

Merged
merged 1 commit into from
May 26, 2023
Merged

Add Libvirt to the Vagrant config file #1490

merged 1 commit into from
May 26, 2023

Conversation

Simbaclaws
Copy link
Contributor

Gives the ability for users who have the libvirt plugin installed in vagrant on linux to use libvirt for creating the virtual machine. This change will make sure that the RAM and CPU count will be properly set on each trellis up. Libvirt is working properly so far, but is causing a kernel panic on trellis up because the RAM is set to 512. Currently I have to manually set the RAM to a higher number in order to be able to boot the machine.

I haven't tested this change yet, I'm about to do that right now.

Please add this when people have confirmed it working (not just me).

Basically for this to work, all you have to do is follow the setup instructions for your distribution here: https://vagrant-libvirt.github.io/vagrant-libvirt/

Gives the ability for users who have the libvirt plugin installed on linux to use libvirt/kvm for creating the virtual machine. This change will make sure that the RAM and CPU count will be properly set on each trellis up.
@swalkinshaw
Copy link
Member

This is a good addition, thanks @Simbaclaws

@swalkinshaw swalkinshaw merged commit 268509a into roots:master May 26, 2023
@Simbaclaws
Copy link
Contributor Author

one more thing I thought I'd mention is that you might need to set the VAGRANT_DEFAULT_PROVIDER env variable to libvirt in order for trellis to pickup libvirt as the provider

@@ -208,4 +208,11 @@ Vagrant.configure('2') do |config|
h.enable_virtualization_extensions = true
h.linked_clone = true
end

# Libvirt/KVM settings
config.vm.provider 'libvirt' do [lv]
Copy link
Sponsor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just at a glance, shouldn't this be config.vm.provider 'libvirt' do |lv|? (pipes, not squares)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that might very well be the case, I might've miss-typed or didn't notice it needed pipes... Like I said, wait with adding this until it has been tested :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think you are right here, I might've broken the vagrant file with this change. I'll make a quick update...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see #1491 for a fix @swalkinshaw

Copy link
Contributor Author

@Simbaclaws Simbaclaws May 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for seeing this mistake @talss89 👍

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

Successfully merging this pull request may close these issues.

3 participants