I am trying to build a k3s cluster. To test my Ansible setup script, I want to set up a small sandbox with vagrant.
However I can't figure out how to communicate between two VMs.
The Vagrantfile I have is this:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/noble64"
servers = [
{ :name => "master1", :ip => "192.168.56.2" },
{ :name => "master2", :ip => "192.168.56.3" },
]
servers.each do |opts|
config.vm.define opts[:name] do |server|
server.vm.hostname = opts[:name] + "k3s"
server.vm.network "private_network", ip: opts[:ip]
server.vm.provider :virtualbox do |vb|
vb.name = opts[:name] + "k3s"
vb.gui = false
vb.memory = 1024
vb.cpus = 2
vb.linked_clone = true
end
end
end
As far as I understand the Vagrant documentation, both machines should be able to communicate through their assined ips. ip add show
Shows me that both machines have the IP I assigned to them.
But when running tcpdump ip proto \\icmp
on one machine and ping ...
from the other I don't see any incoming pings.
Is there something I am missing for both machines to be able to communicate?