You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following discussion in #124 we may want to support "Multi VM" nodes also on libvirt topologies (containerlab is already supporting it - thanks @jbemmel for pointing that out).
This could be useful to run vQFX and vMX in netsim-tools.
An example Vagrantfile for vQFX is the following one:
Vagrant.configure("2") do |config|
# RE is also where the data ports are connected
config.vm.define "re" do |re|
re.vm.provider :libvirt do |domain|
domain.management_network_mac = "08-4F-A9-00-00-01"
domain.qemu_use_session = false
end
re.vm.box = "juniper/vqfx10k-re"
re.vm.guest = :freebsd
re.vm.boot_timeout = 360
re.ssh.insert_key = false
re.vm.synced_folder '.', '/vagrant', disabled: true
re.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 2048
domain.nic_model_type = "virtio-net-pci"
end
# First Virtual Network, link to PFE
re.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.254.1",
:libvirt__tunnel_local_port => "10001",
:libvirt__tunnel_ip => "127.1.254.2",
:libvirt__tunnel_port => "10001",
:libvirt__iface_name => "vgif_re_1",
auto_config: false
# Additional UNUSED PORT
re.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.254.1",
:libvirt__tunnel_local_port => "10099",
:libvirt__tunnel_ip => "127.1.254.2",
:libvirt__tunnel_port => "10099",
:libvirt__iface_name => "vgif_re_2",
auto_config: false
# Dataplane Ports are here
(1..5).each do |seg_id|
re.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.22.1",
:libvirt__tunnel_local_port => "1000#{seg_id}",
:libvirt__tunnel_ip => "127.1.22.2",
:libvirt__tunnel_port => "1000#{seg_id}",
:libvirt__iface_name => "vgif_re_dp#{seg_id}",
auto_config: false
end
end
# PFE
config.vm.define "pfe" do |pfe|
pfe.vm.provider :libvirt do |domain|
domain.qemu_use_session = false
end
pfe.vm.box = "juniper/vqfx10k-pfe"
pfe.vm.guest = :freebsd
pfe.vm.boot_timeout = 360
pfe.ssh.insert_key = false
pfe.ssh.username = "tc"
pfe.vm.synced_folder '.', '/vagrant', disabled: true
pfe.vm.provider :libvirt do |domain|
domain.cpus = 2
domain.memory = 2048
domain.nic_model_type = "e1000"
end
# First Virtual Network, link to RE
pfe.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.254.2",
:libvirt__tunnel_local_port => "10001",
:libvirt__tunnel_ip => "127.1.254.1",
:libvirt__tunnel_port => "10001",
:libvirt__iface_name => "vgif_pfe_1",
auto_config: false
end
end
Note: depending on the VM kind itself, the data ports are connected to the RE or to the PFE (i.e. vMX and vQFX have different behaviours)
The text was updated successfully, but these errors were encountered:
Define PFE first (because it has no external links)
End VM definition, start new VM definition within the VM domain template
Add RE parameters
Vagrantfile.j2 will add MAC address and links
If it works, then I'll polish it to add a provider-specific parameter (ex: provider_template) meaning "for this VM execute a full-blown template that will do its own stuff", probably after #96.
Forget about that QDS, aac8a03 adds support for "raw" Vagrantfile template -- a device-specific template that bypasses the standard way of configuring VMs. You could take the same vQFX setup, copy it into vqfx-raw.j2 and adapt it to use our templates for data-plane interfaces.
The functionality is there if we ever need it, vMX is implemented as a container in #670 -- it requires multiple disks and that could get really messy with Vagrant boxes.
Following discussion in #124 we may want to support "Multi VM" nodes also on libvirt topologies (containerlab is already supporting it - thanks @jbemmel for pointing that out).
This could be useful to run vQFX and vMX in netsim-tools.
An example Vagrantfile for vQFX is the following one:
Note: depending on the VM kind itself, the data ports are connected to the RE or to the PFE (i.e. vMX and vQFX have different behaviours)
The text was updated successfully, but these errors were encountered: