OpenStack Networking (Neutron)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
1.2 KiB

def provider_box(provider)
distro = ENV.fetch('DISTRO', 'ubuntu')
boxes = YAML.load_file('../provisioning/boxes.yml')[distro]
# we can always override the box via the VAGRANT_OVN_VM_BOX
# environment variable
return ENV.fetch('VAGRANT_OVN_VM_BOX', boxes[provider])
end
def configure_providers(vm, config)
vm.provider 'virtualbox' do |vb, cfg|
cfg.vm.box = provider_box('virtualbox')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.customize [
'modifyvm', :id,
'--nicpromisc3', "allow-all"
]
vb.customize [
"guestproperty", "set", :id,
"/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000
]
end
vm.provider 'parallels' do |vb, cfg|
cfg.vm.box = provider_box('parallels')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.customize ['set', :id, '--nested-virt', 'on']
end
vm.provider 'libvirt' do |vb, cfg|
cfg.vm.box = provider_box('libvirt')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.nested = true
vb.graphics_type = 'spice'
vb.video_type = 'qxl'
vb.suspend_mode = 'managedsave'
end
end