Solved

VMware equivalent to Hyper-V Pass-through Disk

Posted on 2013-01-10
12
1,438 Views
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?
0
Comment
Question by:DaveQuance
  • 7
  • 5
12 Comments
 
LVL 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) 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.
0
 

Author Comment

by:DaveQuance
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)?
0
 
LVL 117
ID: 38764720
what are you trying to use the RDM disk for? OS disk or Data?
0
 

Author Comment

by:DaveQuance
ID: 38764748
Data, specifically I want to use it for SQL database files.
0
 
LVL 117
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?
0
 

Author Comment

by:DaveQuance
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
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:DaveQuance
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.
0
 
LVL 117
ID: 38765147
use -U
0
 

Author Comment

by:DaveQuance
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.
0
 

Author Comment

by:DaveQuance
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."
0
 

Author Comment

by:DaveQuance
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).
0
 
LVL 117
ID: 38766205
No problems, thanks for your kind comments.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

It Is not possible to enable LLDP in vSwitch(at least is not supported by VMware), so in this article we will enable this, and also go trough how to enabled CDP and how to get this information in vSwitches and also in vDS.
HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now