Openwrt in Hyper-V

Want to add a openwrt machine in hyper-v for testing?  Sadly, the openwrt did not include the hyper-v device driver for the network device.

(Un)luckily there is a legacy network driver in hyper-v that can be used in openwrt.

Steps to add openwrt machine inside hyper-v:

  • In hyper-v, add a machine with 64-128MB ram, legacy network device.
  • Copy the openwrt image to the virtual hard disk.
  • Mount the virtual hard disk (mount /dev/sda2 /mnt) and copy the tulip driver to the hard disk.
  • Boot the openwrt machine.
  • Inside the openwrt machine, add the tulip driver (cd /; opkg install kmod-tulip_3.3.8-1_x86.ipk)
  • ifconfig -a to check the name of the network device.
  • Modify /etc/config/network as usual and restart the network (or reboot).
Advertisements

5 comments

  1. good!
    i use physdiskwrite-0.5.2-PhysGUI-bundle.zip and run by an administrator PhysGUI.exe,write the img file to the vhdx.
    copy ipk to path / use other linux.
    arise “via_rhine: v1.10-LK1.5.0 2010-10-09 Written by Donald Becker” tips.
    I carefully look at the front lines,it say that please press enter!i try to press enter button,surprise!
    i am in~,and the ethernet is good running.
    thx!

    1. My usual practice to write image file to VM is:
      1. Boot a live cd inside the VM(e.g. systemrescuecd, archlinux cd, SliTaz, etc)
      2. Use dd to write the image file to the virtual hard disk.

  2. I’ve created the Virtual Machine in Hyper-V, how do I copy the openwrt image to the virtual hard disk? Where is the virtual hard disk?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s