I have one 300Gb VHD file containing C: (O/S 100Gb) and D: (data 200Gb). How can I extract
each of those volumes so that they reside on individual VHD's?
So, i want to go from this:
1 x 300Gb VHD C: (O/S 100Gb) and D: (data 200Gb)
to
1 x 100Gb VHD C: (O/S)
1 x 200Gb VHD D: (data)
Is there a tool to do this or via powershell?
Thanks
Hi,
You can try to use "disk2vhd" in a virtual machine.
Regards, Terry | My Blog: http://tls1.cc
This posting is provided AS IS with no warranties, and confers no rights.
Hi,
You can try to use "disk2vhd" in a virtual machine.
Regards, Terry | My Blog: http://tls1.cc
This posting is provided AS IS with no warranties, and confers no rights.
- Proposed as answer by Elton_JiMicrosoft contingent staff, Moderator Friday, February 27, 2015 1:22 PM
Thanks
Are there any other ways to do this, as DSK2VHD does not always work?
Hi D.Brenner,
Would it be possible to just mount the 300GB disk, create a new .vhd for the data partition, mount the new .vhd and then robocopy the content from the old data partition to the new vhd.
Then delete the old data partition and extend the system partition to take up the whole of the old .vhd or shrink the old .vhd to just be the side of the system drive. This would leave you with two .vhd.
Kind regards Michael
Hi D.Brenner,
Would it be possible to just mount the 300GB disk, create a new .vhd for the data partition, mount the new .vhd and then robocopy the content from the old data partition to the new vhd.
Then delete the old data partition and extend the system partition to take up the whole of the old .vhd or shrink the old .vhd to just be the side of the system drive. This would leave you with two .vhd.
Kind regards Michael
- Proposed as answer by Elton_JiMicrosoft contingent staff, Moderator Friday, February 27, 2015 1:22 PM
- Marked as answer by Elton_JiMicrosoft contingent staff, Moderator Friday, March 06, 2015 6:04 AM
Hi D.Brenner,
>>Are there any other ways to do this, as DSK2VHD does not always work?
In Disk2VHD , you can just select the partition D then "copy" D drive to a new VHD which contains the partition information of original VHD , you can shoutdown the VM then mount the original vhd then delete the D partition also mount the new VHD then delete C partition .
After this you will get two disk contain C and D partition .
In addition , you can try to mount the VM's VHD file to host , then create a new vhd through hyper-v manager , during create new vhd wizard you can select copy from the source disk , then please follow the steps above to delete the partition you do not want .
(before this please backup that VM first )
Michael's suggestion is easy and useful .
Best Regards,
El
Hi D.Brenner,
Elton_Ji - thanks for the comment.
One extra thing to add is that its also possible to create a .vhd file from disk manager so if not on the Hyper-v host and on another member server or windows client, its still possible to mount the source vhd and create a new.
Kind regards Michael
Thanks for your updates. The issues that I have encountered with Disk2VHD are
to do with the exporting of multiple partitions located on logical/physical drive.
In some situations, for reasons that I have not yet figured out, when using Disk2VHD,
if you have 2 volumes (as mentioned above) such as C and D, even if you only select one
volume to be exported to a VHD, Disk2VHD still copies the space that the 2nd volume (D)
ocupys as part of the export. But, this does not always happen. Sometimes Disk2VHD exports
just the partition you want exported.
This is the reason that I was looking for an alternative to Disk2VHD, such as some other
product or maybe powershell.
Thanks for the ideas. I am suprised that there are no tools that you can use to do this sort of maintenance on a VHD, as sometimes you don't have the option of moving data and creating new VHD's etc as suggested (thinking of things like Exch/SQL/3rd party stuff that could be installed on these partitions).
Yes Robocopy is great, and would does work as suggested, but what we are trying to do in this scenario is at a lower level :)
The aim is to split a 1 x 300Gb VHD C: (O/S 100Gb) and D: (data 200Gb)
in to 1
x 100Gb VHD C: (O/S) and 1 x 200Gb VHD D: (data) while keeping
the data within each 100% intact and as it was, so that the Server sees no
change (no data moved, databases reinstalled etc).
So what we are looking for is something that can do what SCVMM does, but is inexpensive
or free (eg DSK2VHD). Maybe there is not anything
The end result, no matter the tool, is exactly the same. If you want to end up with two distinct virtual hard drives, I don't see that SCVMM or DSK2VHD presents you with anything different than robocopy.
Or, you can set up an evaluation copy of SCVMM and try it there. But it will take longer to set that up than to perform the robocopy steps. In either case, you end up with two virtual hard disks that need to be assigned to the same VM.
None of the methods should affect any of the installed software because everything is still pointing to C: and D:. (Of course the typical caveat applies of try it in a lab unless you want to make your production environment your lab).
Hi, yes there are lots of ways to do this, but in this instance we are trying to find a way to do it as per:
The aim is to split a 1 x 300Gb VHD C: (O/S 100Gb)
and D: (data 200Gb)
in to 1
x 100Gb VHD C: (O/S) and 1 x 200Gb
VHD D: (data) while keeping
the data within each 100% intact and as it was, so that the Server sees no
change (no data moved, databases reinstalled etc).
To clarify on a key issue here, the data MUST stay in the same physical location on the disk(VHD), hence copying data is not an option
In this instance, we don't want to copy data or create new VHD's. We just need (for business reasons), to split one VHD in to 2 directly. Maybe there just is no way to do this...
The aim is to split a 1 x 300Gb VHD C: (O/S 100Gb)
and D: (data 200Gb)
in to 1
x 100Gb VHD C: (O/S) and 1 x 200Gb
VHD D:
In this instance, we don't want to copy data or create new VHD's. We just need (for business reasons), to split one VHD in to 2 directly
Your two statements contradict each other. First you say you want to have two separate VHDs. They you say you do not want to create new VHDs. It is completely impossible to have two VHDs from one VHD. How would you accomplish that with a physical disk? VHDs are not magic. They follow the same rules as the physical disks. If I have a physical disk with two partitions and I want to separate that into two separate disks, I have to copy some data. That can be a copy or a backup, but the data has to be moved from one disk to another. The same applies to virtual disks.
the data within each 100% intact and as it was, so that the Server sees no
change (no data moved, databases reinstalled etc).
The data will remain intact if proper tools are used to move the data. I simply do not understand how you can expect to create a second virtual hard disk to contain the data from another virtual hard disk without moving the data to the second disk.
If done properly the server will see no change.
- Edited by D.Brenner Thursday, March 12, 2015 11:10 AM
Hi, care to explain how ?
I have been doing robocopy splitting VHD's for ages.