Use a VHD or VHDX file as the RAM disk image instead of .img
7 posts
Can you please build in support for .vhd and .vhdx drive images as this would help with compatibility in Windows.
Thanking you in anticipation of your response.
VHD and VHDX support can mean a few different things, and some are much easier to do than others, so before we build anything it would help to know what you have in mind.
Would you want to load an existing .vhd or .vhdx file into a RAM disk, or save a RAM disk's contents as a .vhd or .vhdx so that Windows or Hyper-V can open the image directly, without RAM Disk? And is it the older .vhd format, .vhdx, or both that you work with?
It would also be useful to know roughly how big those images are and what you use them for, such as virtual machines, backups or moving data between PCs.
Thank you for your prompt reply.
I would like to open and create .vhd and .vhdx files directly in Windows or virtual machines and be able to create them as RAM disks with a preference for .vhdx
Thank you
That could mean one of two things, and one of them already works today.
The first is keeping a .vhdx file on a RAM disk, for example a virtual machine's disk, so that it runs from memory. That works now: create a RAM disk as usual, then create or copy the .vhdx file onto it and attach it in Windows or in your virtual machine software.
The second is RAM Disk itself using a .vhdx file as its image, in place of its own .img format, so that the same file can be loaded as a RAM disk and also opened directly by Windows or a virtual machine when RAM Disk isn't involved.
Which of the two is it? If it's the second, could you describe a typical case where you'd use it, and roughly how big the image would be?
Use in place of the .img format as it is more compatible with other programs and so it may be directly loaded as a RAM disk and directly loaded by Windows without RAMDisk support.
As an example, I usually create disks of 64GB and above as scratchpads for temporary and working files as I have a large amount of memory (128GB, and I do mean gigabytes), working with audio data files and images for conversion for personal use.
Thank you, Casey.
This is now built in. RAM Disk 26.10, out today, can use a VHD or VHDX file as the image for a RAM disk, in place of our own .img format.
It works the same way as an .img image. To make a new one, choose Image → Create Image and pick the *.vhdx file type, then choose Disk → Add and specify that file as the image. The file is loaded into memory when the disk starts and saved back like any other image, and it shrinks again as you delete files. To convert a RAM disk you already have, right-click it and choose Save As to copy it into a new VHDX.
When RAM Disk isn't using the file, Windows and virtual machine software can open it directly. Just don't attach it in Windows while a RAM disk is using it.
There are a few limits. Files we create are always dynamically expanding VHDX, up to 2 TB, so 64 GB disks are well within range. Existing VHD and VHDX files, fixed or dynamic, can be loaded too, as long as they hold a single partition. Hard disk emulation isn't available with these files, and Mount Image still takes our own .img images only, since Windows can mount a VHDX by itself.
The details are in the manual, and the current version is on the RAM Disk page.