取个12版本镜像http://wiki.openwrt.org/doc/howto/virtualbox

按照下面网页设置ok

http://ediy.com.my/index.php/blog/item/31-openwrt-in-virtualbox

Advertisements

Tags

ArduinoDDWrtDelphiDigisparkElectronicsOpenwrtOthersRaspberry PiSoftwareWeb

Latest comments

  • Wireless Router Remote Control CarAdmin15.03.2014 09:42

    You can click on Contact from menu to contact me or email to support@ediy.com.my

    Read more...

  • Wireless Router Remote Control Carfelipe15.03.2014 06:56

    I dude Now it´s working! I can see the stream and the serial commands blinking in a led from my router ...

    Read more...

  • Wireless Router Remote Control CarAdmin11.03.2014 19:41

    car.* images .... etc must in /www directory of router, but not /www/wwwpub. This article not complete ...

    Read more...

  • Wireless Router Remote Control Carfelipe11.03.2014 10:19

    hey dud! I copy the files (car.* images .... etc ) into a new folder /www/wwwpub and setting in ...

    Read more...

  • Recover bricked TL-MR3020 Wireless N RouterAakashk02.03.2014 21:03

    hello i reached till the command hornet> cp.b 0x80000000 0x9f020000 0x3c0000 and thereafter nothing is ...

    Read more...

You are here: Home  Blog  OpenWRT in VirtualBox

Wednesday, 22 August 2012 15:49OpenWRT in VirtualBox

Tweet1

  • Print

  • Comments (2)

If you are considering to test OpenWRT without a router or you don’t want to flash the router firmware over and over again. Here is the right place for you.

OpenWRT in VirtualBox is an image file run in VirtualBox. By the time I write this article, the VirtualBox & OpenWRT image version are Ver 4.1.20 and 10.03.1 respectively.

Download

VirtualBox 4.1.20 for Windows hosts x86/amd64

OperWrt image file for VirtualBox ver 10.03.1 (This one not work for me, ext-2 error and read only file system occur)

Raw image (This one work for me. See below to convert to vdi format)

Convert img to native VirtualBox format

  • Unzip the raw image to VirtualBox folder (C:\Program Files\Oracle\VirtualBox)

  • Open Ms DOS Command Prompt

  • Enter C:\Program Files\Oracle\VirtualBox (This is the location where virtualbox install)

  • Enter VBoxManage convertfromraw --format VDI openwrt-x86-generic-combined-ext4.img openwrt.vdi

  • Now you have a new vdi file named openwrt.vdi

If you don't want to scratch your head to converting the vdi file. Here I provided a converted vdi which the network is already configure nicely.

Install VirtualBox

  • Run VirtualBox-4.1.20-80170-Win.exe

  • Follow on screen instructions until complete installation (always use default settings)

Setup VirtualBox

  • Run VirtualBox

  • VirtualBox main screen should appear as shown in figure below.

  • Click New to create a new Virtual Machine.

  • Click Next to continue.

VirtualBox Main Screen

  • Choose a name for the machine, it can be any name. Here I use OpenWRT

  • Choose Linux for the Operating System

  • Choose Linux 2.6 for Version

  • Click Next to continue  as shown in figure below

Create New Virtual Machine

  • Select the amount of memory, keep the default setting.

  • Click Next to continue

Select the amount of memory

  • Choose Use existing hard disk since you want to use the OpenWRT image file as the new virtual disk

  • Click the file icon to select the OpenWRT image file as shown in figure below

  • Click Next to continue

  • Finally click Create button to finish

Virtual Hard Disk

Starting OpenWRT in VirtualBox

VirtualBox with OpenWRT virtual machine

OpenWRT just stop working due to OpenWRT vdi image file does not support SATA Controller.

VirtualBox stop working under SATA Controller

Figure below shows  the Storage settings where OpenWRT vdi image file is loaded under SATA Controller. We must move the image file from SATA Controller to IDE Controller

  • Click on Settings icon

  • Click on Storage section

  • Right click SATA Controller

  • Select Remove Controller

VirtualBox SATA Controller Settings not working

  • Right click IDE Controller

  • Select Choose existing disk

  • Select OpenWRT vdi image file as shown in figure below

VirtualBox IDE Controller Settings

Again OpenWRT stop working as shown in figure below. To solve this problem we have to enable Serial Port with Port Mode disconnected.

VirtualBox stop working without Serial Port enable

Just enable serial port without touching other settings.

VirtualBox Serial Port Settings

Start the VM (You must press Enter virtual machine boots but doesn't activate the console), OpenWRT is running as shown in figure below.

OpenWRT in VirtualBox

Setting up Network

I configured two network adapters for the virtual machine. The first adapter use "NAT" & the second adapter use "Bridge". The first adapter allows you to download additional OpenWrt software packages via the internet connection of the host system. While the second network adapter is connected to the Ethernet adapter of the host system, which itself could then be connected to the network switch.

VirtualBox Network Adapter1 Settings

VirtualBox Network Adapter2 Settings

Modify Network Configuration File

The /etc/config/network configuration must match with the above network system. Use vim to edit the file.

vim /etc/config/network

vim /etc/config/network

# Copyright (C) 2006 OpenWrt.org

config interface loopback

option ifname   lo

option proto    static

option ipaddr   127.0.0.1

option netmask  255.0.0.0

config interface wan

option ifname   eth0

option proto    dhcp

config interface lan

option ifname   eth1

option proto    static

option ipaddr   192.168.1.11

option netmask  255.255.255.0

Above example set the OpenWRT IP address to 192.168.1.11. Save the file and reboot OpenWRT.

As shown in figure below, opkg update is able to download package list from internet.

OpenWRT opkg update

Here is a working vdi file which the network settings is configure based on above settings.

OpenWRT in VirtualBox相关推荐

  1. OpenWrt配置篇

    http://antkillerfarm.github.io/ OpenWrt编译 1.下载代码 git clone git://git.openwrt.org/openwrt.git 2.安装必要的 ...

  2. 《智能路由器开发指南》——1.1 OpenWrt简介

    本节书摘来异步社区<智能路由器开发指南>一书中的第1章,第1.1节,作者:张永智 ,李章明,更多章节内容可以访问云栖社区"异步社区"公众号查看 1.1 OpenWrt简 ...

  3. 《智能路由器开发指南》——2.3 使用VirtualBox部署

    本节书摘来异步社区<智能路由器开发指南>一书中的第2章,第2.3节,作者:张永智 ,李章明,更多章节内容可以访问云栖社区"异步社区"公众号查看 2.3 使用Virtua ...

  4. 编译x86架构的openwrt系统,让笔记本从u盘启动openwrt

    2019独角兽企业重金招聘Python工程师标准>>> 下载openwrt源码,  参考:  http://blog.csdn.net/u011641885/article/deta ...

  5. 利用虚拟机virtualbox配置智汀家庭云,让米家设备连接Homekit

    前言 以往讲述了通过Docker搭建智汀家庭,那么本文在为大家讲解下通过使用虚拟机来运行智汀家庭云.智汀家庭云的功能使用,具体大家可以通过官网体验中心进一步学习(官方地址:https://sademo ...

  6. 一文万字带你入门智能路由器OpenWrt系统,并在虚拟中安装配置OpenWrt

    一.什么是智能路由器 接入网络的家庭用户终端越来越多,路由器控制越来越复杂,因此需要一个智能网关来管理家庭的设备,智能路由器就是这个网关. 另外,这个智能网关直接连在互联网上,需要隔离家庭网和互联网的 ...

  7. 斐讯n1驱动是android,在线云编译斐讯N1的openwrt固件(带WiFi驱动,带emmc写入)教程...

    本帖最后由 dostyle 于 2020-9-26 08:53 编辑 闲言少叙,直接上干货. 1.     安装虚拟机 WMwera 或 Virtualbox.(略)本教程以Virtualbox为例. ...

  8. OpenWrt固件编译

    OpenWrt固件编译 编译OpenWrt需要Linux环境或mac环境,不支持Windows,如果要在Windows上开发,那么肯定是要装虚拟机的.(根据云隐技术7688开发板) 若不想折腾,下载虚 ...

  9. 树莓派3B/4B从零开始编译安装并刷入OpenWrt,让空闲的树莓派变成路由器

    不知道是不是全国的大学都一样,在宿舍内用4G网络真的是卡的不得了.这我哪能接受啊?开学没过几天就京东下单了一个TP-Link的路由器,还好学校没啥限制,提供的网线可以直接插WAN口上用.但是没过几天, ...

最新文章

  1. 用WSDL定义Web服务
  2. python构建知识库_手把手教导实战Python Web项目
  3. Web 应用服务器端渲染入门指南
  4. 计算机应用技术基础-2答案,2017年计算机应用技术基础练习题及答案
  5. python语言磁力搜索引擎源码公开,基于DHT协议,十二分有技术含量的技术博客...
  6. SpringBoot中LogBack日志输出配置记录
  7. go 变量大写_和我一起学Go系列:Go基本语法概览
  8. notifyIcon 用法
  9. 微商引流产品有哪些?做微商如何引流以及推广产品?
  10. java:布局方法(边界布局)
  11. kali下安装VMware
  12. win10添加照片查看器
  13. 后台隐身自动屏幕截图、后台自动屏幕截图、后台自动截屏、隐身自动截屏、后台监控软件(带有密码保护)—— 定时执行专家
  14. 互联网APP监控即时报警解决初步方案
  15. 再谈BPM(业务流程管理)为企业带来哪些提升
  16. Linux命令之计算器bc
  17. Vue.js中的自定义指令directives
  18. 物联网感知层数据通信综合创新技术
  19. 对保险欺诈说“不”!中国人寿财险携手百度智能云开启智能反欺诈时代
  20. 【性能测试】系统常用监控- -CPU

热门文章

  1. 5 Ways to Speed Up Your Rails App
  2. 算法学习(二)快速排序(下)
  3. C# 解析JSON格式数据
  4. SQL2005中row_number( )、rank( )、dense_rank( )、ntile( )函数的用法(1)
  5. 一次数据分析的全过程
  6. mysql主从中异步和半同步的区别
  7. Sql server在另一台服务器,在Visual Studio 中没问题,IIS中 提示“在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。。。。”...
  8. WEB前端开发规范文档
  9. 分享Java 中如何运行字符串表达式?
  10. 人工智能:从单细胞生物的智能说起