This document describes how to run the OpenWrt x86 port in VirtualBox.
gunzip openwrt.img.gzVBoxManage convertfromraw --format VDI openwrt.img openwrt.vdi (in virtualbox version 5.0.12 the "--format VDI" is at the end of command)VBoxManage convertfromraw --format VMDK openwrt.img openwrt.vmdkext4 needs to be enabled first.for x86_x64 (64-bit) make sure Intel VT-x or AMD-V is enabled, If you do not see this option in your motherboard, you must check the motherboard manual and specifications to identify whether the motherboard supports virtualization technology, Some of the old motherboards on Desktop or Laptop do not offer this feature, x86 is ok.
Linux for your Operating SystemOther Linux (32 bit) or Other Linux (64 bit) for your Version256 MB to something smaller.vdi or .vmdk file using the dialogdmesg boot messages scroll byWaiting for root device PARTUUID=-02… and you compiled the imagehexdump and dd installed on it before compiling the imagehalt the VM if it runs/etc/config/network do the following
config 'interface' 'wan'
option 'proto' 'dhcp'
option 'ifname' 'eth0'
config 'interface' 'lan'
#option type 'bridge'
option ifname 'eth1'
#option ip6assign '60'
Your OpenWrt VM now has Internet access through VirtualBox's NAT gateway.
halt the VM if it runs/etc/config/network configure the lan interface to use eth0, and set an interface type and address config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
# option ip6assign '60' # Unused, no IPv6 in this example
option proto 'dhcp' lan interface with ifup lanYour OpenWrt VM can now interface with other VirtualBox VMs on your host that are also configured to use the internal network you set up.