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

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?

Tags:

3 Responses to “Boot a VM from iSCSI? Yes. We. Can!”

  1. Tweets that mention Boot a VM from iSCSI? Yes. We. Can! -- Topsy.com Says:

    […] This post was mentioned on Twitter by Ewan Leith, VMware Planet V12n, TechHead, vinternals, Luc Dekens and others. Luc Dekens said: RT: @vinternals: New Post: Boot a VM from iSCSI? Yes. We. Can! http://goo.gl/IaZZ <- Great info […]

  2. Technology Short Take #5 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers Says:

    […] VMware KB: Cisco Nexus 1000V drops packets when Mac Pinning How Hyper-V responds to disk failure Boot a VM from iSCSI? Yes. We. Can! Lights, Camera, Replication : UBER SRM Video […]

  3. tirxpan Says:

    Awesome tip. Saves the hassle of having to modify the VMware BIOS or chainload for the sake of etherbooting.

    Thanks for the tip.

Leave a comment