Created
March 29, 2021 17:25
-
-
Save manero6/cad09e5378451a4087f177c2e0c37b68 to your computer and use it in GitHub Desktop.
Vagrant Fedora all Spins (LibVirt and VirtualBox)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VM_BOX = ENV["VM_BOX"] || "fedora/33-cloud-base" | |
VM_RAM = ENV["VM_RAM"] || "1536" | |
VM_CPU = ENV["VM_CPU"] || "2" | |
### Fedora Spins -> https://spins.fedoraproject.org | |
spins = %w( | |
gnome | |
kde | |
xfce | |
lxqt | |
lxde | |
mate | |
cinnamon | |
) | |
Vagrant.configure("2") do |config| | |
config.vm.box = VM_BOX | |
config.vm.provider "libvirt" do |lv| | |
lv.memory = VM_RAM | |
lv.cpus = VM_CPU | |
lv.graphics_type = "spice" | |
lv.video_type = "qxl" | |
lv.channel type: "spicevmc", target_name: "com.redhat.spice.0", target_type: "virtio" | |
lv.channel type: "unix", target_name: "org.qemu.guest_agent.0", target_type: "virtio" | |
end | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = VM_RAM | |
vb.cpus = VM_CPU | |
end | |
spins.each do |i| | |
config.vm.define "fedora-#{i}" do |vm| | |
vm.vm.hostname = "fedora-#{i}" | |
vm.vm.provision i, type: "shell", inline: "dnf -y group install #{i}" | |
vm.vm.provision "vdagent", type: "shell", inline: "dnf -y install spice-vdagent" | |
vm.vm.provision "graphical", type: "shell", inline: "systemctl set-default graphical.target" | |
vm.vm.provision "reboot", type: "shell", inline: "reboot" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example:
vagrant up fedora-cinnamon
check status:
vagrant status