Can't create VHDX on Hard Disk Emulated volume

Started by Mark

Mark

Can't create VHDX on Hard Disk Emulated volume   14 September 2016, 06:53

Hi, I'm evaluating your RamDisk product for possible commercial use and replacement for DataRam Ramdisk. I'm using your version 3.4.7, 64-bit on Windows 10 with the latest upgrade.

I create a 500 MB NTFS volume with Hardware Disk Emulation checked, then try to create a 100 MB VHDX (version 2) file in Disk Management (selecting your volume and using Action / Create VHD), it fails with this error message from the Virtual Disk Manager:

"The request could not be performed because of an I/O device error"

If I create a 100 MB VHD (version 1) file the same way, it succeeds. In both cases, it doesn't matter whether it's fixed or dynamic.

If I create a 500 MB NTFS volume with Hardware Disk Emulation unchecked, then creating a VHDX works just fine.

So of the four possibilities, VHD and VHDX, with and without Hardware Disk Emulation, the VHDX with Hardware Disk Emulation case fails.

Thank you.
SoftPerfect Support forum - Andrew avatar image

Re: Can't create VHDX on Hard Disk Emulated volume   14 September 2016, 22:21

That's true, I confirm I have been able to reproduce this bug. However it may not be easy to fix it as unfortunately Disk Manager doesn't detail what error occurred or what it didn't like.

I guess in the meantime I recommend just to avoid the non-working combination.
Mark

Re: Can't create VHDX on Hard Disk Emulated volume   16 September 2016, 08:50

Thanks for confirming. I will continue to experiment without HDE, or with HDE in a non-VHDX context. Unfortunately, the error code returned by the Windows CreateVirtualDisk() API (if I do the creation manually) is 1117, ERROR_IO_DEVICE. Not very specific. All MS says of that code is "The request could not be performed because of an I/O device error." If you would like, I can provide all the parameters used with CreateVirtualDisk() and then you can reproduce the error in Visual C with a simple test program.

My interest in Hard Disk Emulation stems from the fact that when opened as a block device using \\.\PHYSICALDRIVEn, your ramdisk is the only one I've found that properly responds to DeviceIoControl() API calls such as IOCTL_STORAGE_GET_DEVICE_NUMBER and IOCTL_STORAGE_READ_CAPACITY. You have a very good hard disk emulation.
SoftPerfect Support forum - Andrew avatar image

Re: Can't create VHDX on Hard Disk Emulated volume   20 September 2016, 15:04

I tried some example programs that call CreateVirtualDisk() and it likewise failed with ERROR_IO_DEVICE. Unfortunately debugging tools like Process Monitor and API calls tracing didn't help much. Honestly at this point I am not sure how to debug this sad
SoftPerfect Support forum - Andrew avatar image

Re: Can't create VHDX on Hard Disk Emulated volume   02 October 2016, 21:14

Good news: we've finally been able to identify and fix this issue in version 3.4.8 available from the RAM Disk home page.

It turns out during processing a SCSI function, namely SRB_FUNCTION_EXECUTE_SCSI with operation code SCSIOP_SYNCHRONIZE_CACHE, the driver didn't handle it and returned STATUS_INVALID_DEVICE_REQUEST to the OS. Apparently the OS thought cache sync wasn't working and couldn't process transacted file operations. This is handled correctly now, so VHDX creation and similar transacted file operations should work well.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 ********   **         ********  **         ******   
 **     **  **    **      **     **        **    **  
 **     **  **    **      **     **        **        
 ********   **    **      **     **        **   **** 
 **     **  *********     **     **        **    **  
 **     **        **      **     **        **    **  
 ********         **      **     ********   ******   

Message: