Really appreciate all the work you do with the Powershell toolkit however I think I may have found a few bugs in the new 3.0 Toolkit relating to Server 2003 conversions from VMware to Hyper-V.
1) The first one is the ConvertTo-NaVhdx CMDlet which gives the below error when I use -Win2k3ScsiToIde parameter. It does boot up however and also tried without the -Win2k3ScsiToIde parameter and get the old IDE driver error when booting the VM:
PS D:\Hyper-V\Static-Cots> ConvertTo-NaVhdx -SourceVmdk "D:\Server2003.vmdk" -DestinationVhdx "D:\Server2003.vhdx" -Win2k3ScsiToIde
ConvertTo-NaVhdx : Could not find driver cache location on virtual disk.
+ CategoryInfo : InvalidOperation: (:) [ConvertTo-NaVhdx], ArgumentException
+ FullyQualifiedErrorId : IdeDriverException,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.HyperV.ConvertToNaVhdx
WARNING: The VMDK to VHDX conversion was successful, but the IDE driver injection was not successful. The VHDX may need repair before booting.
2) The second problem is I then repair the alignment (Repair-NaVirtualDiskAlignment) on a Server 2003 VM and there is no error, but when I try to boot the VM it says it's missing an operating system.
I should note that the VMDK files were copied onto the NetApp storage using a host based copy but this was working fine when I was using toolkit 2.4. I have also tried converting to VHD first but get the same two errors.
Any help or guidance would be much appreciated as I like the idea of converting straight to VHDX and checking the alignment rather than converting the VHD, Check / Fix alignment and then goto VHDX.
Message was edited by: Jason Padman
Thanks for the report. Which version of Windows Server 2003 are you converting? What is the type of the VMDK?
It definitely looks like the two issues are related. In ConvertTo-NaVhdx with the Win2k3ScsiToIde switch, the converted VHDX file is mounted to the host so that the appropriate drivers can be configured. The error you are seeing occurs when the cmdlet is unable to find the location from which to extract the drivers on the mounted virtual disk. Based on your observation after performing the alignment repair, it would appear the conversion cmdlet was able to successfully attach the converted VHDX, but did not find the filesystem.
There are a few things you can try to help figure out what exactly is going on. After performing the ConvertTo-NaVhdx (with or without the Win2k3ScsiToIde switch), are you able to successfully mount the VHDX and see the filesystem contained within? Are you able to successfully convert to VHD (again, with or without the Win2k3ScsiToIde switch)?
Let me know how it goes,
Thanks for the fast response Steven! Will double check on the 2003 versions tomorrow but can tell you that I was able to boot the VM after initial conversion from VMDK to VHDX but only with the Win2k3ScsiToIde switch. The same for VMDK to VHD.
I tried on two separate 2003 servers as i'm just about to perform a large V2V conversion with a script I've written based on the NetApp shift project and have been testing extensively with Toolkit version 2.4. With the new version after running the repair I could not boot at all.
Will report back tomorrow.
I am looking at this problem again as I've not been able to solve it. I am able to mount the Server 2003 VHDX with two volumes using the mount-navirtualdisk cmdlet and it gives drive letters to each volume within the VHDX... e.g. E:\ & F:\ with E:\ being the system drive. I am able to read / write to both volumes so am not sure why i still get a black screen and error message on boot saying "Error loading operating system".
I have also checked the boot.ini which looks ok to me:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /noexecute=optout /fastdetect
I have also tried injecting the IDE driver again by converting the VHDX to VMDK and back again with the -Win2k3ScsiToIde switch but still get the same error message.
Is there anything else i can try to help diagnose why I am getting this error?
I want to make sure I'm understanding the issue correctly:
1) You start with a VMDK with Windows Server 2003 installed.
2) You use ConvertTo-NaVhdx to convert the VMDK to a VHDX with the -Win2K3ScsiToIde switch.
*** At this point the VHDX is bootable, but misaligned ***
3) You use Repair-NaVirtualDiskAlignment to fix the alignment of the VHDX
*** At this point the VHDX is aligned but no longer bootable, "Error loading operating system" ***
Is this correct?
You are 100% correct. I have tried variations going to VHD instead of VHDX first but always get the same problem not being able to boot "Error loading operating system" after the alignment. I also always get the first error I mentioned with the ConvertTo-NaVhdx to convert the VMDK to a VHDX with the -Win2K3ScsiToIde switch.
I could live with this error just happening on one server but it is happening to multiple 2003 servers but has also worked with other 2003 servers.
I really appreciate you taking the time to look into this for me.
Just checking in to say i've solved my problem using the alignment feature in VMware converter as I was unable to get the powershell alignment cmdlet "Repair-NaVirtualDiskAlignment" working for some VM's. For anyone else interested, here is a good presentation on how the new VMware converter can do alignment with NetApp storage: https://communities.netapp.com/docs/DOC-21038
Thank you Steven for trying to help me solve this. Hoping this mystery might get solved in a future release of the toolkit.
I have some good news! We ran into an issue where some versions of Windows Server 2003 wouldn't boot after running Repair-NaVirtualDiskAlignment that we were able to fix--I'm fairly certain it is the same issue you were running into here.
Long story short, Windows was looking for the starting offset of the boot partition by reading the CHS address in the MBR partition table (not the starting LBA value), which was calculated using the VHD/X disk geometry. Turns out, that is not the geometry Windows expected, hence the "Error loading operating system" message.
Look for a fix in an upcoming release of the Toolkit!