Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

VMware equivalent to Hyper-V Pass-through Disk

Posted on 2013-01-10
Last Modified: 2014-11-12
I have a vSphere Essentials 5.1 package. I want to use the equivalent of a Hyper-V pass-through disk on one of my volumes for a single guest VM. The server has a single SCSI controller card.

As far as I can tell you would do this through DirectPath I/O Configuration. My confusion is that I don't see a way to do the disk like in Hyper-V, it looks like to do so I need to DirectPath the controller. Based on the warning I'm assuming that if I were to DirectPath that controller then the other volumes that I have VM configurations and vmdks will no longer be accessible by their VMs.

Am I understanding this correctly? Or is there some way I can facilitate giving direct access to a volume on that controller to a single VM without impacting the other VMs and their access to the other volumes?
Question by:DaveQuance
  • 7
  • 5
LVL 119

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 38764359
It can be done, see my EE Article, the function is called Raw Device Mapping (RDM), and is normally reserved for iSCSI and FC LUNs (unless you use VM Direct Path I/O)

HOW TO: Add Local Storage (e.g. a SATA disk) as a Raw Disk Mapping (RDM) or Mapped RAW LUN to a virtual machine hosted on ESXi

VM Direct Path I/O, the VM will sieze control of the PCI device e.g. storage controller, and will be "removed" from the host, so all your VMs would be lost.

Author Comment

ID: 38764626
The link was very helpful however I did run into a problem.  Upon creating it I received this error (from the vmkfstools -r command):

Failed to reopen virtual disk: Failed to lock the file (16392).

The file created and otherwise looked okay so I decided to try the rest but it fails to boot giving this error:

An error was received from the ESX host while powering on VM <server>.
Cannot open the disk '<vmdk file from RDM' or one of the snapshot disks it depends on.
Failed to lock the file

The server had a snapshot when I added the disk. I didn't need the snapshot so I deleted the snapshot from it only because of the snapshot reference, no luck. This volume was recently added as VMFS storage and ls commands don't show any other existing files on it.

I was thinking I should probably remove the mapping and re-add it. Thoughts (and how would I remove it, if needed)?
LVL 119
ID: 38764720
what are you trying to use the RDM disk for? OS disk or Data?
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.


Author Comment

ID: 38764748
Data, specifically I want to use it for SQL database files.
LVL 119
ID: 38764816
i do not think the cause is the snapshot.

remove the raw disk, can you boot the vm?

delete and re add, do you get the lock error?

Author Comment

ID: 38764846
Removed it, successfully booted the VM, added the drive *while* booted and received the same error (mostly):

Failed to add disk scsi0:2.
Failed to power on scsi0:2.
Cannot open the disk '<vmdk file>' or one of the snapshot disks it depends on.
Failed to lock the file

Author Comment

ID: 38764960
How would I undo the creation of this mapping? I was thinking maybe undo it, then remove the storage, re-add it (having formatting as well), then re-adding the mapping. The volume is empty so there would be no harm in doing so.
LVL 119
ID: 38765147
use -U

Author Comment

ID: 38765359
Unmapped it, deleted the storage, re-added the storage (VMFS 5), re-mapped it, with the same error. Removed the mapping deleted the folder and tried it again using the real path instead of the friendly name, same. Unmapped deleted folder tried to put it at the root of the storage, no change. Lastly I tried the root with just calling it a.vmdk to make sure that there wasn't anything in the characters I used for some weird reason..

Every time upon running the -r: Failed to reopen virtual disk: Failed to lock the file (16392).

Any ideas?

Edit: Before any of this I removed it from the vCenter and made sure *all* vSphere clients or other connections were closed. The only open session to it should have been my SSH session.

Author Comment

ID: 38765405
If it matters what I'm adding is a RAID 5 volume from an LSI MegaRAID controller 9266-8i.

I found the below reference with someone doing the RDM for a local SATA drive. I removed the storage and re-added it to confirm I have been doing Partition Format GPT (total size is 1.09TB). I'm doing this creation of the volume under Configuration -> Storage *before* doing the mapping.

"Problem solved. Just in case anyone gets in the same pickle as I did here is what happened.
I was experimenting with two drives, (as one should do) unfortunately both drives had been used to install ESXi and were formatted in the vmfs format. I reformatted them to GPT and hey presto it all works fine."

Author Comment

ID: 38765481
Problem solved, I wasn't 100% understanding what to do, no fault of your document.

Basically I had *added* the storage first in the vSphere client and I was putting the VMDK *on* it. The second I deleted the storage, with it gone then did everything it came up and the disk if formatting in Windows now.

My apologies for my mistake taking up more of your time. I really appreciate the info you provided and helping me with the terminology difference (RDM vs pass-through vs DirectPath).
LVL 119
ID: 38766205
No problems, thanks for your kind comments.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Vm Workstations on a Single Server 8 43
VM edit 2 37
Inventory reset. 1 29
Heavy disk access when running multiple VMs. 13 52
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question