In my case both system run Linux, although different distributions. The solution is pretty simple:

  1. create a “host-only” network interface in VirtualBox
  2. assign it to the virtual machine

More detailed instructions can be found on superuser.com by user rofrol. I had to do one more step and add a matching network configuration on the host system:
Screenshot-Editing VBox Host Only
Happy developing! 😊