fredag 1 maj 2009

ESXi and iSCSI for fun and profit!

i have a fairly minimalistic setup of computers here at home. a small apartment without room for a full blown computer lab.

my quest this past week have been to migrate (rebuild) my current lab environment from microsoft hyper-v to vmware ESXi update 4.

the computer i run as the host of the virtual machines is the HP 2510p ultraportable laptop from HP. 1,2Ghz CPU (with VTx), 2GB RAM and a slow 100GB 4200 rpm 1,8" drive.
far from supported in the HCL for ESXi. the only other computer on my network that is always on (you cant count an apple tv, right?) is a mac mini G4 PPC with 512MB RAM hooked up to a TV.

the plan was to utilize a 1TB external USB-drive from iomega with built-in RAID0 as storage for the VM:s (no problems in hyper-v offcourse) on the 2510p.
but ESXi does not support USB and i have been hacking the oem.tgz, trying all kinds of stupid ways to get USB support and finally gave up.

now i have it working and want to share.

i now have two 1TB drives connected via usb to the mac mini and is running netbsd:s iSCSI package, sharing one of the 1TB drives as an iSCSI SAN.
the HP laptop is booting vmware ESXi from a usb-thumbdrive and is connected to the SAN.


here is how you do it:

  1. install ESXi to a thumbdrive
  2. iSCSI on OS X


    run ./iscsi-target you should get a output similar to this:



  3. connect ESXi to you new SAN!
    • open the VI client and connect to your ESXi server
    • go to the configuration tab and click storage adapters
    • open properties for the iSCSI hba.
    • under the general tab, click configure and check enable.
    • under the dynamic discovery tab, click add and type in the IP for the iSCSI-host
    • confirm by clicking close.
    • click storage and verify that you have some newly connected storage to play with.



  4. test!
    • create a virtual machine and see if it works. mine does!



note: i don't run XP. it is just a virtual machine to run the VI client in from my primary apple laptop.