virtualbox_WSL2
virtualbox_WSL2 copied to clipboard
virtualbox_WSL2 is incompatible with landrush plugin
The vagrant landrush plugin adds the VMs to a VM-only DNS server. It works well on Linux, and on Windows/WSL2 with Hyper-V as provider. It does not seem to work with landrush, apparently because the landrush plugin obtains the 127.0.0.1 IP address.
When using the virtualbox_WSL2 plugin and the landrush plugin together, you will get the following error message:
==> myvm: Automatic installation for Landrush IP not enabled
==> myvm: [landrush] Setting up iptables rule on guest for DNS server 10.0.2.3
==> myvm: [landrush] network: :private_network, {:type=>"dhcp", :auto_config=>true, :protocol=>"tcp", :id=>"60b3de88-160b-491e-a0eb-02548fc6d554"}
==> myvm: [landrush] network: :forwarded_port, {:guest=>22, :host=>2222, :host_ip=>"127.0.0.1", :id=>"ssh", :auto_correct=>true, :protocol=>"tcp"}
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
Normally, this error message indicates that the landrush server is not running; the command "vagrant landrush start" would resolve this. However, with virtualbox_WSL2, this solution does not work.
To reproduce:
vagrant plugin install landrush
vagrant landrush start
And in the Vagrantfile, add the following:
instance.landrush.enabled = true
instance.landrush.tld = [ 'vagrant' ]
instance.landrush.upstream '1.1.1.1'