New
#1
Fun trying to convert an existing install to a vhd!
This is not specifically windows 10 but I thought it might be of interest.
I currently have dual boot 10 home and 10 pro, and it leaves the partitions decidely non-optimal. I decided I would create a virtual hard disk of the Home drive partition and delete the home partition.
My drive is 1000 GB - partitioned as 3 drives (approx) 250 Home, 250 Pro, 500 Data.
The Home drive only actually uses around 40 GB.
So I used disktovhd to convert home drive (ignoring all others) to an expandable vhd (only 40 GB) on Data drive (over 400 GB free).
I then used bcdboot command to enable booting from it, and rebooted.
But it would not boot complaining not enough space on host (data) drive!
I rebooted to windows, attached the vhd from disk management and I was surprised - disk to vhd nominally maps all partitions from the whole drive (ie 1000 TB) even if you do not want them! After quite a bit of googling, I discovered when you use an expandable vhd, it only loads if there is enough space to fit whole of original disk (so it can expand to that in future).
So the vhd had nominally 750 GB of unallocated space1 More googling, and there is a tool vhdresizer which will reduce it in size. However, tool is so old, and requires a really old version of .Net, I could not get it working.
So I thought, i will just image the Home drive partition only to the Data drive using Macrium Reflect, and convert that to a vhd. I was gob smacked to see the MRF image exhibited similar behaviour and the vhd still thought drive was 1000 GB!
So I thought I would try creating a virtual disk and use Macrium to clone the Home drive partition to a new vhd, bbut it looked ok but would not boot.
So, after trial an error, I finally did it using a smaller 150 GB drive in a usb caddy as follows.
1) Image backup Home drive to Data Drive
2) Restore backup to 150 GB drive
3) Create image backup of 150 GB drive and convert to vhd on Data drive (I probably could have used disk2vhd for this step ie 1 action only).
Then it worked. OK - maybe there are quicker ways but this did the job. So I was now able to wipe the home drive, and assign the space to data drive.
The home drive vhd is on the data drive and only takes 40 GB but can expand up to 150 GB over time.