In VirtualBox go to “Network Adapters…” from the Devices menu and set Attached to: Host-only Adapter.

Set up IP addresses in the same sub domain. On the host:
ifconfig vboxnet0 192.168.56.1 netmask 255.255.255.0
On the guest:
ifconfig eth0 192.168.56.2 netmask 255.255.255.0
route add default gw 192.168.56.1
Use secure copy to transfer files from host to guest. From the host:
scp filetocpy guestuser@192.168.56.2:/guestdir/
Advertisement