gunzip openwrt.img.gz
VBoxManage 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.vmdk
ext4
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.node
Linux
for your
Operating System
Other Linux (32 bit)
or
Other Linux (64 bit)
for your
Version
256 MB
to something smaller
.vdi
or
.vmdk
file using the dialog
dmesg
boot messages scroll by
Waiting for root device PARTUUID=-02…
and you compiled the image
hexdump
and
dd
installed on it before compiling the image
halt
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.less
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 lan
Your OpenWrt VM can now interface with other VirtualBox VMs on your host that are also configured to use the internal network you set up.ide