This article is a bit off-topic if compared to what I usually write about ‘VDI’, but I thought it was worth to share. I really like the benefits of PXE booting and wanted to run PXE boot in my homelab, however my LinkSys WRT320N wireless router only provides very basic DHCP functionality. The other option would be Windows DHCP and DNS in a VM; however if the VM or host (I have a homelab in a box) is down for any reason all other devices in the house that use DHCP would not be able to get to the network and internet, including iPhones, PlayStation, Microwave, Oven etc…
I needed a solution in a device that is always powered on and do not have dependencies on the host server. My iOmega IX4-200d! The iOmega IX4-200d is a Linux based device and is capable of providing shell access, therefore it is possible to use it to install and execute additional services. I have chosen dnsmasq because it’s an all-in-one stable solution, providing DHCP, DNS and TFTP in a single service.
Follow the steps below to transform your iOmega IX4-200d (The solutions also works well for different models).
1 – Download and install firmware 184.108.40.20694 or earlier
2 – Browse http://your-nas-ip-address/support.html and enable the SupportAccess option. (This will enable SSH/Shell access)
3 – Using Putty connect via SSH to your iOmega IX4-200d IP address (User:root Password: see reference post below)
Reference for the password: http://www.pkguild.com/2010/01/shell-access-to-your-ix2ix4-exposed-get-yer-red-hot-ssh-here/
Copy/Past the below in the SSH session.
cat <<EOF > /etc/ipkg.conf
src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable
After that you can check the list of available packages by typing
To install dnsmasq package type:
ipkg install dnsmasq
Edit the dnsmasq configuration file:
if you are not familiar with vi editor, here is a quick guide.
Enable DHCP in dnsmasq configuration file:
domain=yourdomain.com,subnet/24 (add your FQDN domain and netmask)
dhcp-range=x.x.x.x,x.x.x.x.,12h (add your IP range and lease period)
dhcp-option=3,x.x.x.x (replace x.x.x.x with the network gateway)
pxe-service=x86PC, “Install Linux”, pxelinus (remove #)
Enable TFTP in dnsmasq configuration file:
enable-tftp (remove #)
tftp-root=/boot/ftpd (required because /var/ftpd doesn’t have enough space for ESX boot files)
tftp-no-blocksize (remove #)
For initial troubleshooting purpose enable logging
log-queries (remove #)
log-dhcp (remove #)
Configure the upstream DNS nameserver to be used when sending queries. These are most likely your ISP DNS servers. Keep the first line with 127.0.0.1 nameserver.
Start dnsmasq service typing
If you are not interested in PXE server configuration you may stop here. For every configuration change it is required to restart the service. The options are as below.
Configuring PXE boot filename
The services are configured and now it’s necessary to deploy the PXE boot files:
Create the TFTP root folder
Download pxelinux.0 from here and using WinSCP or other SCP file manager copy pxelinux.0 to /boot/ftpd
Open ESXi4.1 ISO and extract the following files:
Using WinSCP or other SCP file manager copy the files to /boot/ftpd/vmware/esx4.1
Configuring ESXi4.1 bootstrap
Create a default file in /boot/ftpd/pxelinux.cfg
Now, past the following into default
menu title VMware VMVisor Boot Menu
append vmware/esx4.1/vmkboot.gz ks=ftp://x.x.x.x/pxe/ks.cfg nameserver=x.x.x.x — vmware/esx4.1/vmkernel.gz — vmware/esx4.1/sys.vgz — vmware/esx4.1/cim.vgz — vmware/esx4.1/ienviron.vgz — vmware/esx4.1/install.vgz
Replace all x.x.x.x with the your iOmega IX4-200d IP address.
Configuring ESXi4.1 kickstart repository
I decided to use iOmega IX4-200d own’s FTP server to host the kickstart script (ks.cfg) and the ESX4.1 source files. It’s also possible to use the built-in HTTP server, however because it is mounted as read-only I didn’t want to touch it.
Go to Setting and Enable FTP Access.
Using WinSCP or any other FTP tool connect to the iOmega IX4-200d IP address and login as anonymous with no password.
Create a folder named pxe and copy the ks.cfg file into this new folder.
A simple ks.cfg using DHCP would be as below.
autopart –firstdisk –overwritevmfs
install url ftp://your-nas-ip-address/pxe/esx4.1
network –bootproto=dhcp –device=vmnic0
If you want to learn more about ESX scripted installation:
Copying ESXi4.1 Source Files
The last step is to copy the ESXi4.1 source files to the FTP repository that will host the installation files. Using WinSCP or any other FTP tool connect to the iOmega IX4-200d IP address and login as anonymous with no password.
Create a folder called esx4.1 and copy all the files from the ESXi4.1 ISO into this folder.
(Attention, Do not copy the ISO itself)
Make sure you change the DNS nameserver for all your computers and VMs that use static addressing. You now have your iOmega IX4-200d configured as DHCP, DNS, TFTP, FTP and PXE boot server. To test the solution I like to use VMware Workstation empty VMs.
Additionally, don’t forget to disable any other DNS and DHCP services running in your network.
Last but not least, this procedure is not supported by iOmega and you may use this tutorial on your own risk.
- How to: Windows Server 2012 RDS with Horizon View
- How to Access Windows 2K8 Server via PCoIP with VMware View
- ESXi 5.0 Enhanced Security Profile
- How to: Win2K8 w/ PCoIP, Linked Clones, USB, Printing & much more on VMware View (DaaS)
- Horizon Application Manager 1.5 – Troubleshooting: Logs and Services