Long story short: regardless of what you specify for the size of the VHD, the wizard always creates it as 1 GB.
It seems that there are two textboxes in the form for VHD size: txtVHDSize and txtVHDDriveSize
The former is invisible while the latter is not. The latter is (obviously) the one that the user can enter a new value into.
However, when text substitution is done on the configuration, the value is being grabbed from the invisible one.
This same issue exists for VHD name (txtVHDBlobName and txtVHDName), but it's not as important to me.
So, these lines:
// Replace the tokens - VHD settings
cfgStr = cfgStr.Replace("@@VHDBLOBNAME@@", txtVHDBlobName.Text.Trim().ToLower());
int driveSize;
int.TryParse(txtVHDSize.Text, out driveSize);
cfgStr = cfgStr.Replace("@@VHDBLOBSIZE@@", txtVHDSize.Text.Trim().ToLower());
Should be changed to:
// Replace the tokens - VHD settings
cfgStr = cfgStr.Replace("@@VHDBLOBNAME@@", txtVHDName.Text.Trim().ToLower());
int driveSize;
int.TryParse(txtVHDDriveSize.Text, out driveSize);
cfgStr = cfgStr.Replace("@@VHDBLOBSIZE@@", String.Empty + driveSize);