Skip to content
Snippets Groups Projects
Commit e79989d3 authored by Benoit Donneaux's avatar Benoit Donneaux
Browse files

Enable serial and use var. for pool

parent 5a678a6f
No related branches found
No related tags found
1 merge request!393Draft: Support QEmu local grid - DO NOT MERGE
......@@ -4,6 +4,9 @@
# This Vagrantfile worked for Florian Sesser using Vagrant 2.2.16dev and
# the VirtualBox Hypervisor. Earlier Vagrant and LibVirt did not work.
# Get the LibVirt pool name or use default
pool_name = ENV.has_key?('POOL_NAME') ? ENV['POOL_NAME'] : 'default'
Vagrant.configure("2") do |config|
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
......@@ -14,9 +17,9 @@ Vagrant.configure("2") do |config|
# Tune QEmu guests
config.vm.provider :libvirt do |libvirt|
# Using a specific pool may help to manage the disk space
libvirt.storage_pool_name = "morph_local"
libvirt.snapshot_pool_name = "morph_local"
# No need of graphics
libvirt.storage_pool_name = pool_name
libvirt.snapshot_pool_name = pool_name
# No need of graphics - better use serial
libvirt.graphics_type = "none"
libvirt.video_type = "none"
end
......@@ -89,9 +92,11 @@ Vagrant.configure("2") do |config|
end
# To make the VMs assign the static IPs to the network interfaces we need a rebuild:
config.vm.provision "shell", inline: "echo '{nix.trustedUsers = [ \"@wheel\" \"root\" \"vagrant\" ];}' > /etc/nixos/custom-configuration.nix"
config.vm.provision "shell",
inline: "echo '{ nix.trustedUsers = [ \"@wheel\" \"root\" \"vagrant\" ]; boot.kernelParams = [ \"console=tty0\" \"console=ttyS0,115200\" ]; }' > /etc/nixos/custom-configuration.nix"
config.vm.provision "shell", inline: "nixos-rebuild switch"
config.vm.provision "shell", inline: "systemctl stop firewall.service"
config.vm.provision "shell", inline: "systemctl start serial-getty@ttyS0.service"
config.trigger.after :up do |trigger|
trigger.info = "Hostname and IP address this host actually uses:"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment