Hypervisor: Debian 10
Host: Debian 10
Provider: libvirt
Version: 2.2.7 (problem appeared in 2.2.6 also)
I'm writing because I am having some trouble with my vagrant boxes. I have some idea what is going on, based on the symptoms, but I don't know how to fix it.
Basically, I have somewhat complex networking needs, so I have set up two bridges on my hypervisor, and I make the vagrant vms connect to the bridges depending on which network I want them to be on.
So, for example, take my development machine.
config.vm.define :devel do |host|
host.vm.hostname = "devel"
host.vm.network :public_network, # home.lan
:dev => "brhome",
:type => "bridge",
:mac => aa:00:00:00:10:20"
host.vm.provider :libvirt do |hyperv|
hyperv.cpus = 8
hyperv.memory = 6144
end
monosyllabic_ssh_key_config(host)
host.vm.provision :salt do |salt|
salt.bootstrap_script = 'salt/bootstrap-salt.sh-v2019.10.03'
salt.install_type = 'git'
salt.install_args = 'v2019.2.0'
salt.minion_id = "devel"
salt.minion_config = "salt/minion"
salt.minion_key = "salt/base/private/keys/devel.pem"
salt.minion_pub = "salt/base/private/keys/devel.pub"
salt.verbose = true
salt.run_highstate = 'true'
end
end
So you see, I add the network interface to link to the bridge here, and then the salt
provisioner installs new netplan files to configure the interface on the client. But then,
if I reload the machine, I get stuck waiting for SSH to become available "forever".
I understand that the problem is in my new network configuration. But I'm not sure
what the problem is exactly or how to fix it. I've spent some time looking at the vm's
system logs but I don't see anything out of the ordinary. I can ping the hypervisor
from the vm on the private IP address 192.168.121.1, and I'm pretty sure I can
ping and SSH to the vm's private IP address on 192.168.121.0/24.
Do I need to have any specific routes to make vagrant be able to connect via SSH?
Or is there something else I'm missing? What do I need to do to get my machine
to work?
Happy to provide logs and more information.
Thanks,
Alex