Hi,
I managed to get UnRAID running in a virtual machine on my VMWare ESXi server with fairly minimal tinkering, so I thought I'd document the process incase anyone else might find this useful. It uses both Raw Device Mapping and USB Pass Through, so it should be reasonably performant and easy to migrate to/from a physical/virtualised platform... and your USB license key will work too! I haven't done any real testing yet, but on an array format, I was getting ~60MB/sec, which seems reasonable for the three SATA disks I was testing with.
Comments/improvements welcome - particularly around the faff of creating a virtual boot disk image, which seems like overkill?
NOTE: I haven't done any proper testing on this, so please don't be silly and use it with production data!
Cheers,
Bryan
Install ESXi 4.1 on your physical server and enable Remote Tech Support (SSH)
To enable SSH, boot your ESXi node and at the status screen:
<F2> Customise System
Troubleshooting Options
Enable Remote Tech Support (SSH)
<ESC> Exit
<ESC> Log out
SSH into your ESXi Host and create Raw Device Pass-thru devices
Download Putty
SSH to your ESXi Host
Username: root
Password: <blank by default>
# Identify your disks
fdisk -l | grep '^Disk'
...
Disk /dev/disks/t10.ATA_____ST3160812AS_________________________________________5LS3P8SB
Disk /dev/disks/t10.ATA_____WDC_WD1600JS2D75NCB3__________________________WD2DWCANM7450414
Disk /dev/disks/t10.ATA_____WDC_WD1600JS2D75NCB3__________________________WD2DWCANM7453963
...
mkdir /vmfs/volumes/datastore1/UnRAID
cd /vmfs/volumes/datastore1/UnRAID
vmkfstools -a lsilogic -z /vmfs/devices/disks/t10.ATA_____ST3160812AS_________________________________________5LS3P8SB mydisk1.vmdk
vmkfstools -a lsilogic -z /vmfs/devices/disks/t10.ATA_____WDC_WD1600JS2D75NCB3__________________________WD2DWCANM7450414 mydisk2.vmdk
vmkfstools -a lsilogic -z /vmfs/devices/disks/t10.ATA_____WDC_WD1600JS2D75NCB3__________________________WD2DWCANM7453963 mydisk3.vmdk
# NOTE: you we're using /vmfs/devices/disks here ... not /dev as above!
Install UnRAID onto a USB Stick, but with a different volume name
Step 1 Plug the Flash into your PC and re-format it using Windows (Right-Click the Flash under Computer and select Format):
For File system, leave it as Default
For Volume label, enter "ROOT" (or anything else, other than UNRAID!)
Check the Quick Format box and click Start
Step 2 Download the syslinux tool from the Lime Tech download page, and extract syslinux.exe to a simple directory, for example, c:\.
Step 3 Click on Start / Programs / Accessories. Right-Click on Command Line Prompt and choose Run As Administrator. In the dialog box, type "c:\syslinux.exe -ma f:"
...and then press the Enter key. If necessary, change the directory from c:\ to whatever directory you downloaded syslinux to, and change the f: to use whatever drive letter that Windows mounted your Flash on (you can double check the drive letter by looking under Computer).
While it will appear to do nothing, the syslinux tool will create a hidden system file named ldlinux.sys on the Flash and make the drive bootable. The latest version and a complete distribution of syslinux is available here.
Step 4 Download the latest unRAID Server, and extract the files from the zip archive to your Flash.
Step 5 Open Computer, Right-Click on the Flash drive and choose Eject.
Create a virtual boot disk image from the UnRAID USB Stick
Download/Install WinImage (free trial available)
Create virtual hard disk from physical drive
File name: unraid.vmdk
Save as type: VMWare VMDK (*.vmdk)
Select the partition to connect to: <cancel>
Put the USB Stick back to normal, for use later for config/license storage
Rename USB Stick to "UNRAID" (exactly 6 characters, all upper case) (Right-click the Flash under Computer and select rename)
Eject the USB Stick (Open Computer, Right-Click on the Flash drive and choose Eject)
Put the USB Stick into your ESXi Host
Upload the boot hard disk image to ESXi's datastore
Point your vSphere Client at your ESXi Host and then:
Select the physical host
Go to the summary Page
Right click your datastore (datastore1) and select Browse Datastore...
Upload the two files created when we made the image of the USB Stick
* unraid-flat.vmdk
* unraid.vmdk
Create your Virtual Machine
Point your vSphere Client at your ESXi Host and follow the New Virtual Machine Wizard:
custom
virtual machine version: 7
guest os: Linux / other 2.6x Linux (32-bit)
Number of virtual processors: 1
Memory Size: 1GB
How many NICS do you want to connect: 1
NIC1: VM Network / Adapter: E1000 / Connect at Power on: Yes
SCSI Controller: LSI Logic SAS
Use an existing virtual disk
Browse... Datastore1 -> UnRAID -> unraid.vmdk (the usb image we made)
Virtual Device Node: IDE (0:0)
Mode: Independant / Persistant
Edit the virtual machine before completion: yes
Add... USB Controller
Add... USB Device
Support vMotion while device is connected: no
For each of your physical disks:
Add... Hard Disk
Select the type of disk to use: Use an existing virtual disk
Browse... datastore1 -> UnRAID -> diskname
Virtual Device Node: scsi(1:0)
Mode: Independent / Persistent (it should now appear as a Mapped Raw LUN in VM hardware list)
Re-configure the SCSI controller that was added for you
Change Type... LSI Logic SAS
SCSI Bus Sharing: none
Finish
Finished!
You should now be able to power on the VM and UnRAID will boot as normal. From here, follow the usual instructions on how to set up networking and administer UnRAID via the WebUI. /boot will be mounted from your USB stick, so your array config and any changes to the 'go' script will need to be made to the USB stick as normal.
Good luck!