Skip to content

Instantly share code, notes, and snippets.

@linuxsimba
Last active October 16, 2017 01:14
Show Gist options
  • Select an option

  • Save linuxsimba/3c92a611cd27f42874c5d5e8e56e005e to your computer and use it in GitHub Desktop.

Select an option

Save linuxsimba/3c92a611cd27f42874c5d5e8e56e005e to your computer and use it in GitHub Desktop.
vagrantfile for vqfx10k - vagrant libvirt.
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.vm.provider :libvirt do |libvirt|
libvirt.nic_model_type = "e1000"
end
config.vm.define :junos01 do |node|
node.vm.synced_folder '.', '/vagrant', :disabled => true
node.vm.box = 'vqfx10k-re-fixed-dhcp'
# em1/em2 are management ports?? probably something to do with the PFE
# Probably doing this wrong cause the github.com/Juniper/vqfx10k-vagrant/
# seems to make these 2 interfaces use a unique network per device.
# WIP: need to comeup with a more permanent solution once I build out multiple
# Junos devices. Perhaps use UDP Tunnels instead.
node.vm.network :private_network,
:auto_config => false,
:libvirt__forward_mode => 'veryisolated',
:libvirt__dhcp_enabled => false,
:libvirt__network_name => 'vqfx_internal'
node.vm.network :private_network,
:auto_config => false,
:libvirt__forward_mode => 'veryisolated',
:libvirt__dhcp_enabled => false,
:libvirt__network_name => 'reserved-bridge'
# WIP: set the remaining interfaces to use UDP Tunnels for now just configure
# bridges since only one device is set
(1..5).each do |seg_id|
node.vm.network :private_network,
:auto_config => false,
:libvirt__forward_mode => 'veryisolated',
:libvirt__dhcp_enabled => false,
:libvirt__network_name => 'reserved-bridge'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment