Support > User Customizations

UnRAID on VMWare ESXi with Raw Device Mapping

(1/92) > >>

bryanr:
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>

--- Code: ---# 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!

--- End code ---

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!

prichards:
hi, have you made any further testing on this topic, like rebuilding the array?
I'm really interested on the stability of this setup.

thanks in advance

ftp222:
I had planned to test and verify parity from an already existing unRAID array this weekend, but had issues upgrading my CPU to a 64-bit compatible one (ESXi requires this).  I will try it again next weekend and report back.

On a side note, you do not have to create the vmdk image file to boot from, which is probably very confusing and time consuming to many people.  You can use your already working unRAID thumb drive, but you have to tell ESXi how to boot from it by using a CD Boot Image that can boot to USB.  I used a suggestion from another thread and created a CD Boot image in a few minutes with PLOP (http://www.plop.at/en/bootmanagerdl.html).  With this method, you just mount the ISO image as the VM CD-ROM drive and it boots off of your USB drive instantly.

drealit:
Would you mind plopping down the hardware you're using for you builds?  I'm very interested in pursuing a new build similar to this in the future once this receives a bit more testing.  I got rid of my Windows 08 server but have been missing it dearly... came down to money and energy usage.  I've always dreamed of having my unRaid server be multi-purpose but normal vmware just wouldn't work for my needs (power limitations).

madpoet:
This would be great for something like Sage to cut down on the number of boxes needed.

Navigation

[0] Message Index

[#] Next page

Go to full version