9

I have ESXi 4.0 running on an Intel DX58S0 Mothboardboard with an Intel Core i7 930 processor. VT-d is also enabled.

I have three drives in the system, drive 0 is used for ESXi. Drive 1 and 2 contain data from an older machine and show up under the "Storage Adapters" section in configuration.

I would like to allow a guest machine to access the data on these drives (as nativly as possible). I have enabled passthrough of the motherboard's built in SATA controller (Intel/Marvell 88SE6121 ). This controller shows up in my guest OS, but the guest shows no drives aside from the normal virtual drive. I have tried a Linux guest and Windows7. I have also configured the host machine to try IDE/RAID/ACHI modes for the SATA controller.

Any ideas how I can configure one of my guests to get at the raw data on these drives?

2
  • 2
    Is you system/components on the VMWare HCL, specifically listing VT-d compatibility.
    – Chopper3
    May 25, 2010 at 11:38
  • Would VT-d be even relevant with a SATA drive unless you intend to pass through the whole SATA host adapter? Dec 13, 2012 at 11:23

3 Answers 3

9

I had a similar issue with some drives from a server that had failed, I found the answer on this page.http://www.vm-help.com/esx40i/SATA_RDMs.php

It's far easier than controller pass-through or any of the other tricks I'd thought of, but you do need to be able to use the Service Console (google esxi unsupported mode ssh)

summary:

Step 1) fdisk -l to find the device name

Step 2) ls /dev/disks -l to find the VML identifier

Step 3) vmkfstools -r VMLid aVMDKName.vmdk

Step 4) Add the aVMDKName.VMDK to a virtual machine.

eg: vmkfstools -r /vmfs/devices/disks/naa.5000c5003010054f /vmfs/volumes/hdd/lanparty.vmdk

I wasn't able to boot off the disks as I had hoped to (P2V without copying 500GB across the network), but I was able to attach them to another virtual machine and get at the data.

1
  • Is your /vmfs/volumes/hdd an existing datastore associated to existing disks or a new datastore has to be created for the new disk?
    – golimar
    Aug 2, 2019 at 14:18
1

Another solution would be to perform the following:

Step 1) Make sure remote tech support (SSH) is enabled and running. Step 2) SSH to the host Step 3) fdisk -l | grep -B4 'doesn't contain a valid partition table'

Note: This will show you all the physical disks that don't have partitions yet, such as a newly-provisioned SAN LUN. It should look something like this:

Disk /dev/disks/naa.60060e801004eb90052fab6900000000: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/disks/naa.60060e801004eb90052fab6900000000 doesn't contain a valid partition table

Disk /dev/disks/naa.60060e801004eb90052fab6900000001: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/disks/naa.60060e801004eb90052fab6900000001 doesn't contain a valid partition table

Disk /dev/disks/naa.60060e801004eb90052fab6900000002: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/disks/naa.60060e801004eb90052fab6900000002 doesn't contain a valid partition table

If this command doesn't show you any devices, my procedure probably isn't for you, as I, like the previous posters, make the assumption that the reason your VC "Raw Device Mappings" radio button is greyed-out is because the LUN doesn't have a partition.

Step 4) Create a new partition, "fdisk /dev/disks/naa.60060e801004eb90052fab6900000000" Note: You'll have to use your own device name here. Step 5) If you're not too familiar with fdisk, you can do this:

a) "p" to print existing partitions. If you don't see any, then it's probably safe to proceed.

b) "n" to create a new partition.

c) "p" for primary

d) "1" for partition 1

e) to select default start sector

f) to select default end sector

g) "w" to write

h) "q" to quit

Step 6) Now you should be able to assign the raw disk in VirtualCenter.

0

The last answer is true but with some modification in commands, like these

  1. fdisk -l to find the device name
  2. ls /dev/disks -l to find the VML identifier
  3. vmkfstools VMDKName-withFullPath.vmdk (i.e. /vmfs/volumes/disk2/somename.vmdk) -a adaptertype -z /vmfs/devices/disks/vml.0200000000600508b1001037383941424344450d004c4f47494341
  4. Add the VMDKName-withFullPath.vmdk to a virtual machine.

Note: In step 3 you may use -r switch instead of -z. These switches depends on your disk controller. Another important issue is that this solution is for raw access to disk. To access a partition in a physical manner, maybe you must use -r switch.

You must log in to answer this question.