Inventory Setup for SSH

Hi! I’m just new here as I am new with ansible. I am using Alpine Linux VM on VirtualBox and my remote host will be Ubuntu Server 20.04 VM on VirtualBox too. I would like to ask how to know the IP address of ubuntu server that will enable me to connect to it via SSH in my alpine vm? The IP address I am currently using is 10.0.2.2 and it doesn’t seem to work. Even a ping will give me errors, “failed to connect to host via ssh” and “data could not be sent to remote host

I would also like to know what are the initial configurations and setups to make SSH work which I think I have missed.

Thank you so much in advance

By default vbox uses a NAT’d network setup hence the 10.x addressing. You won’t be able to get to them from ‘outside’ vbox using ping etc. you can only vagrant ssh in. You need to use a bridged network for external access, checkout private_ or public_network in the Vagrantfile docs to set this up.

Thank you for your reply but I have no idea how to checkout private_ or public_network in the vagrantfile docs. I already enabled bridged network in my VM on virtualbox before. If you dont mind, may I know the whole command needed to be executed? Sorry for the trouble but I literally have no knowledge or background about this.