Posts Tagged ‘gPXE’

Boot a VM from iSCSI? Yes. We. Can!

October 9, 2010

I was having a chat with someone the other day and we got onto the subject of that most excellent open source project, Etherboot/gPXE. For the uninitiated, gPXE is basically a replacement for the ancient PXE ROM found in pretty much all NICs today, and brings network booting into the 21st century. It gives us the ability to use alternative protocols for the boot media, instead of being restricted to TFTP as the current PXE ROMs generally are. If you want to know more about why this A Good Thing, check out this video.

Anyway, the question was asked if it was possible to boot a VM from iSCSI directly without any involvement from VMFS. Having actually done this quite some time ago, I knew it was possible so I said “yes”, but unfortunately I couldn’t access the memory region that held the answer to the logical next question (how?), and I had to say “I’ll get back to you”.

The only way to do this on physical hardware without using chain loading (ie PXE booting some other program and loading gPXE via it) is to burn the gPXE ROM onto the NIC (I’m conveniently throwing gPXE boot via CD/floppy/USB into the chain loading bucket). Obviously this is not something you would want to entertain with VM’s. But luckily for us, VMware gives us the ability to actually specify a separate file to use for the NIC BIOS! So it’s really quite straightforward, here’s how to do it:

1. Go to the ROM-o-Matic website and create a boot rom with the following options:

2. You should now have a file named gpxe-1.0.1-8086100f.rom.

3. Create a VM with an e1000 NIC.

4. Upload the gPXE ROM file into the same directory as the .vmx file of the VM you just created.

5. Add the following line to the .vmx file:

e1000bios.filename = "gpxe-1.0.1-8086100f.rom"

6. You’re done – you can now take advantage of everything gPXE has to offer.

I tested this out on ESXi 4.1, and it still works like a treat. Why do you need to use an e1000? gPXE doesn’t currently have support for VMXNET3. Since it’s an open source project, perhaps someone from VMware could make that contribution?