Back in Windows 7 I was using Oracle VirtualBox because I needed the 64 bits support to set up SharePoint 2010 virtual machines but now that I run Windows 8, I would rather use Hyper-V!
The goal of this article is to show you that you can get your beloved SharePoint vdi files to run on Windows 8 with Hyper-V with just a little bit of work. I have read a lot of bad stuff about it basically saying that it won’t work properly but I can tell you that it’s nothing to be scared of, I have tested it, you can go ahead with it!
First things first, get Hyper-V installed on Windows 8
Press Windows + X and Click on Programs and Features
Click on Turn Windows features on or off
Select Hyper-V and Click OK and follow the instructions
You will then need to install Oracle Virtual Box on Windows 8 (but do not worry you can delete it later on)
Download and install Virtual Box from here
We will use then Oracle Virtual Box to convert your vdi files into a format compatible with Hyper-V.
I read somewhere that you should uninstall the Guest Tools, I didn’t do it and I got no issues with that.
Using command prompt,
Go in
C:\Program Files\Oracle\Virtual Box (or wherever you have chosen to install Virtual Box)
and Run the following command:
vboxmanage clonehd D:\VMachines\SP2010.vdi D:\VMachines\SP2010.vhd –format VHD
That is it, you can use your vhd as virtual hard drive in a new Hyper-V machine.
Finally, a small trick, get the internet working in your virtual machine through a wireless connection
For those using Hyper-V on a laptop, there is a big chance that you are connected wirelessly. If it is the case, there is a small trick to know in order to get the internet working in the virtual machine (or more generally get the virtual machine to be part of the network), here is how I do it:
Create an Internal Switch in the Virtual Switch Manager of Hyper-V
This action will create a new Virual Adapater.
Create a Bridged Connection between the Wi-Fi and the Internal Switch Virtual Adpater (vEthernet in our example)
Now that everything is set up, you can use the Internal Switch that you created at the first step.
Your Hyper-V machine will be now part of your network as any other physical machine would be.
Hope it helps!
Gilles
Nice and simple! Cheers.
Thanks very much for this. There’s not a lot of documentation around on this and it worked a treat! 🙂
I tried this on a Windows Server 2008 R2 vmdk disk from using VirtualBox previously and the new VHD disk seems to have been formatted like it went through sysprep. Everything is gone. I must be missing something. Whats the point of converting the disk if you have to start over from scratch and rebuild everything?
Hello,
can you explain me a bit more what you did? It sure looks like something went wrong.
I haven’t experienced the same behavior.
Hi Gillou, I have a Win Server 2k8 R2 VM that is in VMDK format from when I used virtualbox. I used the vboxmanage clonehd command above to turn it into a VHD format so I can use it in Hyper-V on my Windows 8.1 desktop now. The command completed successfully and I was able to boot the new VHD machine in hyper-v. However, it was essentially sysprepped (renamed, had to reactivate, server roles removed, no data). How can I convert my VMDK to VHD without losing the system state/data on the VM? I tried 2Tware convert VHD but it would not even boot when I did it that way.
to be honest , I have no idea what is the problem in your case.
I only tried to convert from vdi to vhd, maybe something about vmdk ?
Michael contacted me directly to tell me that he solved the issue. here is the original message:
“It turned out to be the way that VirtualBox handles snapshots. The newer versions use “branched snapshots”, which saves a separate disk file (.vmdk in my case) for each snapshot, that way you can revert back to any snapshot. I was converting the original disk file, which I thought contained everything. So when I converted the original disk, I was getting a sysprepped image, which is what I use for cloning those 2008 R2 servers! I deleted the snapshots which automatically incorporates those changes into the original disk. Then I converted the disk again following your steps in the article and Voila!”
Pingback: Virtual box to Hyper-V is one easy step | Glossover
Pingback: Migrate from VirtualBox | HYPER-V