Bear with me for the long story, but thought of sharing with you all! ![:) π](https://mangolassi.it/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=3hrg7a1ige4)
I've been working on a server migration from a physical server to Azure.
The physical server has Sharepoint running (testing/development-single server), and to save cost, we wanted to migrate to Azure. Plan was to convert the physical servers disk to vhd using microsoft Disk2vhd for both c and d drives, create the Azure account, use powershell to import the vhd files to Azure, create vm using these disks
The disk size was huge and this server was hosted on a different location, and the only access to that was rdp and ftp and the ftp was really not that good on transferring this huge file. Used Disk2vhd converted the drives to vhdx, I had to use hjsplit to split the vhdx files with 3.5GB each and then download, combine back with hjsplit. After few days of downloading, got all the split files locally, combined it back using hjsplit and then used Azure powershell and tried to import it. Then I learned that Azure doesnt work with vhdx file! (as per my experience and research), wasted almost a week for this! ![:( π](https://mangolassi.it/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=3hrg7a1ige4)
Redid the vhd creation, (this time as "VHD"), hjsplit-download-combine-Import- success! ![:) π](https://mangolassi.it/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=3hrg7a1ige4)
So i thought, that was it, followed the MS document, and then created image with the VHD, tried creating the VM, it got stuck on provisioning the VM for around 4 hours and then failed! More google search and found out that the server has to be sysprep'd before you convert to vhd!
But in my case I can't sysprep as the server was already up and running with SP. (Hope this is correct with Sysprep!)
Almost lost hope, but tried one more time.
From Azure- Virtual Machines- Disks- I created 2 disks using the VHD url for the imported VHD files, and then created virtual machine with that- From Gallery-My Disks- selected the c drive disk- and also added the d drive disk as additional- removed the "Install the VM agent" option (enabling this failed the VM creation again), and created the machine, after few minutes, the VM created successfully. Connected to the server via RDP and seems like all working fine! ![:D π](https://mangolassi.it/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=3hrg7a1ige4)
I've given the server access to the dev to make sure the sp site is working fine, and I really hope all good and ignoring sysprep wont harm! ![:) π](https://mangolassi.it/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=3hrg7a1ige4)