From 70d9c37da6c03df2f2be0a47432a75a7651342e8 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Tue, 19 Mar 2019 11:03:40 -0700 Subject: Enable random_hostname vagrant-libvirt value This configuration value allows to generate Libvirt instances with randomly domain names generated. As result, it's possible to use this project in the same server but in different folders at the same time. As part of the change, it was necessary to centraliza some Libvirt common configurations. Change-Id: Ie6adf3f40de7a8cced875b0c899738f9f6449181 Signed-off-by: Victor Morales Issue-ID: MULTICLOUD-301 --- kud/hosting_providers/vagrant/Vagrantfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'kud/hosting_providers') diff --git a/kud/hosting_providers/vagrant/Vagrantfile b/kud/hosting_providers/vagrant/Vagrantfile index 105c7e99..83ac68c2 100644 --- a/kud/hosting_providers/vagrant/Vagrantfile +++ b/kud/hosting_providers/vagrant/Vagrantfile @@ -69,6 +69,12 @@ Vagrant.configure("2") do |config| config.proxy.enabled = { docker: false } end end + config.vm.provider 'libvirt' do |v| + v.nested = true + v.cpu_mode = 'host-passthrough' + v.management_network_address = "192.168.121.0/27" + v.random_hostname = true + end nodes.each do |node| config.vm.define node['name'] do |nodeconfig| @@ -90,9 +96,6 @@ Vagrant.configure("2") do |config| nodeconfig.vm.provider 'libvirt' do |v| v.memory = node['memory'] v.cpus = node['cpus'] - v.nested = true - v.cpu_mode = 'host-passthrough' - v.management_network_address = "192.168.121.0/27" nodeconfig.vm.provision 'shell' do |sh| sh.path = "node.sh" if node.has_key? "volumes" -- cgit 1.2.3-korg