Building a DD-WRT Image In vSphere 5.0
Introduction
I have a need to put a router between my test ESXi 5.0 server and my network. At home, I use a Linksys E3000 (both 2.4Ghz & 5Ghz Wireless-N, gigabit) router, with OpenSource DD-WRT custom firmware. There is a x86 variant that can be downloaded, people mention in the forums about using it on old PCs, I thought I would give making a VM a go.
Pre-Requisites
- An installed copy of ESXi 5.0 (this is almost certain to work on 4.0, but not 3.5)
- The DD-WRT x86 Image. I chose the VGA public image. This is a free version, limited to 4096 connections (fine for my purposes) and without Wi-Fi support. The image that is used is here.
- physdiskwrite – A Windows tool for writing raw images to a hard disk.
- An existing Windows image.
InstallationCreating the Virtual Machine
- Create a virtual Machine. Select a configuration type of Custom.
- Name the VM something appropriate.
- Select a datastore for the Virtual Machine.
- Select ‘Virtual Machine Version: 8’ (if using ESXi 4.0, using version 7)
- For Guest Operating System type, choose ‘Linux’ and select ‘Other 2.6.x Linux (32-bit) from the drop down.
- Choose 1 virtual sockets, with one core per virtual socket.
- Choose 512MB RAM.
- Select the appropriate number of NICs (nearly always 2), E1000, and choose the port groups. (I have found that the first NIC is assigned to the WAN)
- SCSI Controller, choose any. This will be replaced.
- Choose not to create a disk.
- Tick Edit the virtual machine settings before.
- In the Virtual Machine Properties, click Add. Select Hard Disk.
- Select ‘Create a new virtual disk’
- Make the capacity of the disk 1GB. I chose to make it Thin Provisioned.
- Set the Virtual Device Node to IDE (0:0)
- Press OK, then Finish. Wait for the VM to be created.
Install the image to the Disk
- Choose your Windows VM. Power it off if necessary.
- Edit the Windows VM’s properties. Press Add.
- Select a Hard Disk.
- Choose ‘Use Existing Virtual Disk’
- In Advanced Options, ensure that the Virtual Device Node is ‘IDE (0:0)’
- Click OK, then Finish. Power on the Windows VM.
- Load PhysGUI (make sure you elevate it)
- Ensure that you select the ‘VMware Virtual IDE Hard Drive ATA Device’, right click select ‘Image laden’ –> ‘Öffinen’. Select the downloaded DD-WRT image.
- Click OK through the prompts.
- Wait until the disk completes writing. Shut down the VM.
- Edit the Windows VM’s properties. Select the DD-WRT virtual disk and press remove. Ensure ‘Remove from virtual machine’ is selected. Click OK.
- Start up the DD-WRT VM.
Connecting to the Router
- Load another VM on the same LAN as the router. Ensure that it is configured to automatically obtain an IP address.
- It should be assigned an IP by the DD-WRT router’s DHCP server service. You can see this by performing an ipconfig (if using a Windows client)
- Presuming that you have an IP address, use the web browse to connect to 192.168.1.1
- It will ask to set the username and password. Note that if you SSH into the router at a later point, it will use the username ‘root’ with the password set here.
- You are presented with the DD-WRT System Information page. This will show the current hardware, configuration, DHCP client list, etc.
Is there a way to pass the LAN side of the DD-wrt x86 VM out of ESXi to a physical switch for a physical network, instead of just VMs?
Are you using two distinct port groups?
I had an issue where the two ports were on the same subnet and it was reporting that it could see itself- which it did not seem to like too much.
As long as your port group has a physical NIC assigned, I cannot see why you cannot get data out?
Tell me how you have things configured, i.e. NICs, port groups, VLANs, etc.
I was able to do exactly what I do with VMware workstation, however my new issue is:
(gonna copy and paste…its 4am here)
Here is my issue:
http://hardforum.com/showthread.php?p=1038503447#post1038503447
I ran into an issue a few minutes ago with running DD-wrt x86 in ESXi.
What I did, was use the VMware standalone converter to convert my DD-wrtx86 Workstation VM to an ESXi VM.
All of that went well, however, I could not get the DD-wrt ESXi VM to see the WAN of the modem.
Usually, with my workstation VM of DD-wrt, I disable all protocols for the NIC I added thats connected to the modem, except the VMware Bridge protocol. And bridge it to VMnet4 in the Virtual Network Editor.
And works, it passes what the modem sends to the NIC directly to the DD-wrt VM. It gets the IP address and everything from the modem. (this is the 1st NIC that dd-wrt sees, and sees it as WAN)
And then the built in NIC of the motherboard is bridged to Vmnet1 in Virtual Network Editor, and is left alone protocol wise and is connected to a physical switch. (this is the 2nd NIC dd-wr sees) From there, it acts just like a hardwired router. Perfectly. It does take the Windows 7 host a few extra min to get an IP, however everything connected to the physical switch gets served quickly.
Ive set it up similar, or so I thought in ESXi, the DD-wrt x86 served out DHCP perfectly to virtual and physical hosts via the built in NIC. But as I said, the 2nd NIC thats connected to the modem, DD-wrt X86 isnt seeing WAN side.
So, I guess I either need to somehow “bridge” the 2nd NIC thats connected to the modem on the ESXi host to the DD-wrt x86 VM, or Direct pass the 2nd NIC to the dd-wrt ESXi Vm?
My ESXi host doesnt support DirectPath unfortunately.
And from what I can tell here:
[IMG]http://img861.imageshack.us/img861/2049/ddwrtx86config.jpg[/IMG]
Im feeding the modem directly to a virtual switch, instead of the DD-wrt X86 VM in ESXi?
Is there a way to around that?
:edit: Right now it disconnected because I switched back to Workstation to get my internet back.
Incredible! This blog looks exactly like my old one!
It’s on a entirely different subject but it has pretty much the same page layout and design. Outstanding choice of colors!
Heya! I understand this is kind of off-topic but
I needed to ask. Does operating a well-established website such as yours take a massive amount work?
I’m brand new to writing a blog however I do write in my diary daily.
I’d like to start a blog so I will be able to share my experience and views online.
Please let me know if you have any recommendations or tips for
brand new aspiring blog owners. Appreciate it!
Admiring the commitment you put into your blog and in depth
information you present. It’s nice to come across a blog every once in a while that isn’t the same unwanted rehashed material.
Wonderful read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.
Hurrah, that’s what I was searching for, what a data!
present here at this web site, thanks admin of this web site.
If some one needs expert view concerning blogging then i recommend him/her to visit this web site,
Keep up the fastidious work.
First of all, thanks for a comprehensive guide with lots of details! Now to my issue wich i seem not to be able to find a sollution on.
Any ideas why it sais ‘No operating system found’? I followed the guide exactly twice, with the same result.
Should the diskmanager in windows be used to assign driveletters or maybe just add a MBR?
When starting the VM, in the console I can see that it looks for IP adresses and/or network boot rom on both cards. Afterwards it tells me that there are no OS. Any help would be appreciated.
My hardware does not support I/O forwarding, forcing me to add a second virtual switch assigned to the second NIC. This should not change anything, seen from the VM.
Im on ESXI 5.0 running on an older Phenom2 X6, 8 GB Ram and two descrete Intel NICs.
Thanks in advance.
/Wern
Yay google is my king aided me to find this great site! .
i can’t hesitate in direction of test one particular of those people pizzas & other Mediterranean plates… yum!
These wonderfl ɗevices work just like a digicam,
a mini computer, a MP3 pplaуer annd a gamig consoilee
whenever reqᥙired. Even a cheap printe could endd up costing you more ultimately if your ink cartridges are costly.
Eventually, electronics manufacturers started taking into considerɑtion the possibilities
of automating domestiс microcontroller base devices.