2

My scenario :

I have 100 Gb of data that contain a lot of folders and files , so is there a way to create a VHD file from this folders and files ?

Any help is thankful .

devices
  • 21
  • 3
  • Please read http://serverfault.com/help/how-to-ask, specifically the "Search and research" bullet. What have you tried? Why did it not meet your needs? – longneck May 14 '14 at 12:54
  • the question is simple , OP need to create a vhd that contain this 100 GB Folder – nux May 14 '14 at 12:59
  • dupe of http://serverfault.com/questions/74750/how-to-create-a-vhd-file-from-a-folder – Dennis Nolte May 14 '14 at 13:04
  • @nux the question may be simple, but there is no evidence that the OP tried anything other than just asking the question. if the OP wants attention from experienced admins, he's going to need to show that he has put some effort in to it before making us do his work. – longneck May 14 '14 at 13:35

2 Answers2

2

I believe the best way to proceed in your case would be:

  1. Create .VHDX with required size: https://www.windowscentral.com/how-create-and-set-vhdx-or-vhd-windows-10

  2. Move all your files to a newly created and attached disk (.VHDX-based)

batistuta09
  • 8,723
  • 9
  • 21
0

If you can live with the need to copy the data to the vhd and not just convert it then the user xhafan did answer this on SF ~2 years ago.

SF Question

full qoute:

This article explains how to do this.

in short for windows 7/2008: go to computer management, click disk management, right click disk management, click create VHD, enter location. Select the disk, right click, initialize with MBR, right click "unallocated" string, click new simple volume, etc, map the drive letter.

Then copy your files and folder to the drive letter, once done, right click the disk (on the left side) and select detach VHD.

Dennis Nolte
  • 2,848
  • 4
  • 26
  • 36
  • Op need to convert just that folder not all the partition . – nux May 14 '14 at 13:15
  • @nux im not quite sure i can follow your answer. the questions seem equal, he wants to have the 100GB in a vhd as you already pointed out Argueable he could mean without transfering the files first, which is what the solution from xhafan on my linked answer does. Could you elaborate why exactly my answer should be wrong : creating a vhd, mount it, copy the data, unmount, and have your vhd with the data is what the OP asks (how i read it at least) – Dennis Nolte May 14 '14 at 13:21
  • 1
    because when we talk about thousands of folders inside folders and so on , a copy of that data would be time consuming around 2 days , so the aim is to convert just that directory like choosing it not all the partition without any copy or move , i hope you can understand me . – nux May 14 '14 at 13:24
  • changed my comment to have it more clearly that one needs to copy the data. – Dennis Nolte May 14 '14 at 13:33
  • My partition size is 200 GB, but it contain 100 GB of Data (millions of folders and files). I want to create a VHD file from just a part of my Data. (I can convert the entire partition to VHD file but i want to convert a specific folders and files only ) – devices May 14 '14 at 14:08
  • @devices the written solution is for only a part of the partition, the data you want to copy. it is *not* the whole partition. – Dennis Nolte May 14 '14 at 14:13
  • @Dennis Nolte, I have tried to create a new VHD and i have attached it to my Disk Management successfully but when i has copied my Data in it, the copying process is corrupted because of the very huge number of folders and files so i tried to use a software to copied it (xcopy and other) but the process has always failed – devices May 14 '14 at 14:23
  • @devices usually you should an error message for a copy failure (permissions, free space, depth of path/filename, etc) – Dennis Nolte May 14 '14 at 14:27
  • @Dennis Nolte, I know that the error message is because a depth of path and a huge number of folders so i want help to create the VHD file from the folders directly (like the creation of ISO file from folders !) – devices May 14 '14 at 14:36
  • @devices depending on where you want to use the vhd you might have the same issue with path depth file name length ther aswell, so for me it would make sense to fix this issue first. are you actually still able to access (read/write/rename) those file/directorys? – Dennis Nolte May 14 '14 at 14:46
  • @Dennis Nolte, Actually i still able to access (read/write/rename) those file/directories it is not the problem, my question is simple; Do you have any idea about converting directories to one simple VHD file or creating the VHD file from these directories? – devices May 14 '14 at 14:54
  • @devices as we already figured out, you seem to need a solution without copying the data first. I do not have one not found one while searching for it on the MSDN. – Dennis Nolte May 14 '14 at 14:57
  • @Dennis Nolte, Exactly you describe what i need. And i want to thank you to your participation – devices May 14 '14 at 15:03