0

I recently attempted to setup a virtual machine inside ESXi and I'm trying to get it to have access to an entire secondary drive in the server for data storage and whatnot.

When I go into 'Add Hardware' and select hard disk, I'm presented with three options:

  • Create a new virtual disk
  • Use and existing virtual disk
  • Raw Device Mappings

By obvious choice I'd want to use raw device mappings, but it is greyed out. I've tried this guide to create a fake virtual disk that points to a raw drive uuid but this yielded no working results.

I would much rather not create a virtual disk the entire size of the drive as a) I can't truly acheive a virtual disk the full size of the drive and b) there is increased overhead using a virtual disk instead of a raw device mapping (so I'm lead to believe at least).

While it is a single un-raided mechanical drive, it offers just the amount of performance I require from it on it's own. I feel that by using a raw device mapping would yield the best read/write speeds of the drive and also would be convenient to be able to remove the drive for use in another computer to read the data thats on it - rather than having to go through a .vmdk file to access stuff should this be required for any reason.

Many thanks!

  • Does your server motherboard support VT-d ? For direct device redirection you need that. – yagmoth555 Jul 16 '15 at 14:25
  • @yagmoth555 It does, and it is enabled – SteppingHat Jul 16 '15 at 14:26
  • Make sure you are on VMware hcl (vmware.com/resources/compatibility/…) , and that your BIOS is updated to the lastest firmware, as it should already work. – yagmoth555 Jul 16 '15 at 14:34
  • @yagmoth555 What if my hardware isn't on the compatibility lists? I'd very much rather not having to buy another set of hardware. – SteppingHat Jul 16 '15 at 14:40
  • If it's not on the HCL, then it may not (as you are seeing) work as expected. On a side note, there is a pretty minimal performance decrease now on vmdk vs RDM – Rex Jul 16 '15 at 15:35
0

AFAIK RDM does not need VT-d to work unless something has changed since v 5.0 when I last used a Raw Disk Mapping on ESXi.

You don't passthrough the controller to need VT-d. Only the drive.

Regarding the greyed out option for RDM that's probably because you use the desktop vSphere client instead of the Web client (which fully supports RDM).
But even without the web client you can manually create the RDMs via SSH.

The procedure is described on the KB article pou posted. As far as I remember that procedure works.

What exactly doesn't work for you?

Regarding not mapping the entire drive I believe that is not possible.
Raw Disk Mapping is just that. RAW mapping of the drive to a VM.

Regarding the performance, unless you have a very specific workload that doesn't do well on top of VMFS, there isn't any significant gain by using RDM IMHO.

Update:

It turns out I was wrong about RDM support in the Web Client. Both desktop and web client support RDM but only for SAN LUNs, not for local disks.

So, to do a Raw Disk Mapping of a local disk you need to do it manually via SSH.

The KB article (KB1017530) describes the procedure quit well now that I read it all again.

It also mentions that this may not work on some controllers.

What is your hardware exactly? Controller Chipset?

Personally when I first tried to do a raw disk mapping I used this tutorial http://www.vm-help.com/esx40i/SATA_RDMs.php
Maybe this will help you better.

  • Alright that makes sense. Two questions however.. Say in the case of the web client, is there an easy way/article that explains how to install it? A quick google search comes up with all this junk that doesn't exactly help me out in setting it up. Secondly, say I would then go down the road of using a VMFS, how would I set it up to use the ENTIRE capacity of the drive? Past experience has just had me enter the max capacity (fail because over-provisioning) and keep guessing by decrementing each MB until it accepted. surely_there_must_be_a_better_way.gif – SteppingHat Jul 16 '15 at 16:58
  • I updated my answer to cover the RDM part. Regarding provisioning the whole drive to a VM you need to account for extra data that are stored for each VM (swap, logs, etc). Just provision a few GB less than the total available size of the datastore so it doesn't fill and freeze your VM. – Cha0s Jul 16 '15 at 20:07
  • Thanks! I don't remember what exactly went wrong as I tried this many months ago. I'll give it a second shot though and try and properly figure out why it doesn't work. I'm away for the weekend so it might take some time to report back. Hardware wise I'm using consumer spec stuff (so this stuff is somewhat expected) - AMD FX CPU + ASRock 970 chipset motherboard. – SteppingHat Jul 17 '15 at 6:05
  • I got it to work! The problem was that when using the vmfkstools command, the guide I was using was telling me to use the drive ID vs your guide telling me to use the drive vml ID - found in the line: l--------- 0 root root 1984 Jan 1 1970 vml.01000000002020202020202020202020203951473358423630535433353030 -> t10.ATA_____ST3500630AS_________________________________________9QG3CC60 where the vml is everything from vml up to the -> and the drive id being everything after the ->. Thanks for the help! Hope this clears it up for anyone else who hits this problem – SteppingHat Jul 20 '15 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.