This is a simple lab shows you how to connect virtualbox VMs with Gns3.
Picture above show the scenario connecting virtualbox with gns3. Router R1 connecting virtual machine XP1 and router R2 connecting virtual machine XP2.
Configuration of R1
R1#conf t
R1(config)#int fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int fastEthernet 0/1
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no sh
R1(config-if)#exit
Ospf configuration of R1
R1(config)#router ospf 10
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 10.0.0.0 0.0.0.3 area 0
Configuration of R2
R2#conf tR2(config)#int fastEthernet 0/1
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int fastEthernet 0/0
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
Ospf configuration of R2
R2(config)#router ospf 15
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#network 10.0.0.0 0.0.0.3 area 0
watch below video