Monday, July 23, 2007

Resetting recovery console password and mounting vhd

Instructions at petri.co.il and http://support.microsoft.com/kb/322672.

Didn't work with login used due to error: 0x32 Request not supported.

Googling for this error returned this page which unfortunately is only available in Italian. Excerpt:

Attenzione: non è possibile modificare la password di DSRM mediante l’utility NTDSUTIL nel mentre si opera in DSRM (Errore: “Setting password failed. Win32 Error Code: 0x32. Error Message: The request is not supported.”). Viceversa è possibile farlo da DSRM mediante la sequenza di tasti Control+Alt+Del e cliccando sul bottone “Change Password...” oppure inserendo il comando seguente: “net user Administrator *”.

Babelfish translated this as:

Attention: Error is not possible to meanwhile modify password of DSRM by means of utility the NTDSUTIL the work in DSRM (: "Setting password failed. Win32 Error Tails: 0x32. Error Message: The request is not supported."). Viceversa is possible to make it from DSRM by means of the sequence of Control+Alt+Del keys and cliccando on the button "Change Password..." or inserting the following commando: "net user Administrator *".

In the end I didn't need to figure this out because loginrecovery.com succeeded in deciphering the local administrator password.

I put a load of command line registry editing tools on a disc and mounted it on the guest. Unfortunately they all page faulted - they're obviously pretty old and haven't been updated to latest windows versions. I'm really surprised that I couldn't find a registry editor that can be used in the recovery console.

So then I decided to try and mount the vhd on the host so I could use the host's regedit to manually fix the guest's registry file.

I downloaded and installed vhdmount (part of Virtual Server) and from the command line I did the following:

cd c:\program files\microsoft virtual server\vhdmount
vhdmount /m /f vhdfile.vhd V:

which gave me the error "Invalid command line parameters."

I then tried just plugging in instead of mounting

vhdmount /p /f vhdfile.vhd

which resulted in error "Failed to plug in the Virtual Hard Disk (VHD). The specified file is not a valid VHD."

I then typed SET VHD_MOUNT_TRACE=1 and tried this command again which gave me:

[Info] Default user locale is 0x1409[Warning] Dictionary VhdMountStrings.dll doesn't exist.[Info] GetSCSIAddress called for VHD: vhdfile.vhd[Info] Verifying file: vhdfile.vhd[Error] Query failed: 0x57[Error] GetSCSIAddress failed. error code = 0x37[Info] MountVHD called for VHD: vhdfile.vhd[Info] Verifying file: vhdfile.vhd[Error] Invalid VHD signature found: 0x00[Warning] Footer of the given VHD is incorrect. Hence checking the VHD's header
The Virtual Hard Disk is successfully plugged in as a virtual disk device.[Info] VHDMount successful.


"Successful", huh. VHDMount is obviously very pleased to come anywhere near my vhd without crashing itself.

The vhd is split so perhaps this explains incorrect footer. I then tried to fire up Virtual PC to compact the vhd, but it hanged on the splash screen. So now I know what VHDMount was successful at: giving itself exclusive access to the vhd without doing anything useful! I had to kill VPC, unmount the vhd and start VPC again.

No comments: