How-To

How to Migrate VirtualBox VMs to Windows 10 Hyper-V

create-hyper-v-virtual-machine

Upgrading from the free VirtualBox to the more full-featured Hyper-V environment can be done, even though Hyper-V doesn’t support VirtualBox VMs natively.

When it comes to virtual machines, many of us start with Oracle’s VirtualBox. The reasons are obvious. VirtualBox is free for non-commercial use, and unlike Hyper-V, it runs on Windows 10 Home edition. That said, once you get serious with VMs, there comes a time when you want to upgrade to Hyper-V. VirtualBox is fine for basic needs, but Hyper-V, which runs on the Pro Edition of Windows 10, has better performance and a few high-end features like Nested VMs, easier management using PowerShell, and features like BASH for Windows 10. There’s only one problem: Hyper-V doesn’t support VirtualBox VMs natively. So, in order to migrate them, you’ll have to convert them.

In this article, we’ll show you how to migrate an existing Oracle VirtualBox virtual machine to Windows 10’s Hyper-V.

Migrate an Oracle VirtualBox Virtual Machine to Windows 10 Hyper-V

To begin, launch the VirtualBox Manager then select the virtual machine from the list pane you would like to export. Make sure the operating system you are exporting is supported by Hyper-V. Click the File menu then click Export Appliance…

 

Select the virtual machine again, then click Next.

 

Choose the location where you would like to store the virtual machine file, select the OFV 2.0 format then click Next.

 

Click Export then wait while the appliance is exported; this can take some time depending on the size of the virtual machine.

 

Before you can begin the conversion, we will need to use an uncompressing utility such as 7-zip to extract the contents of the OVF file we just exported.

 

Our next step is to import the VM into Microsoft’s Hyper-V software. Hyper-V does not natively support the Open Virtual Format. Initially, I attempted to convert the VM using Microsoft’s free utility called Virtual Machine Converter and the built-in PowerShell cmdlet. I experienced nothing but frustration getting it to work; see the proof below. I said to myself, “Forget this! There has got to be an easier way than going back to the age of Computer Chronicles.”

 

After some web searching, I came across a free utility from StarWind called V2V Image Converter designed just for converting different types of virtual hard disk formats. First, you need to sign up for the free download, which will be sent to you in an email link. After receiving your free download, proceed to download and set up StarWind Converter.

 

Launch the StarWind V2V Image Converter software then click Next.

 

Choose Local file as your source then click Next.

 

Choose the format you would like to convert the image to. Hyper-V supports VHD and VHDX formats. VHDX is an improvement over the older virtual hard disk format, supporting up to 64 TBs of storage. Because this is a Windows XP VM, I will stick with a fixed VHD option called VHD Pre-allocated image.

Browse to where on your hard disk you would like to store the converted image.

 

Select the destination of the VHD file. In my case, this will be used locally, so, I will stick with the default.

Wait while the VMDK file is converted. The larger the VHD, the longer it will take.

Import Virtual Machine into Hyper-V

The next step is to see if it works. Launch Hyper-V in Windows 10, click New > Virtual Machine then click Next. Go through the wizard and configure your virtual machine with the appropriate settings. When you arrive at the Connect Virtual Hard Disk section, choose “Use an existing virtual hard disk,” click Browse…, then open the VHD file we converted earlier then click Next.

Click Finish to confirm your configuration.

Proceed to launch your virtual machine and there you have it. Your Oracle VirtualBox VM is now up and running in Hyper-V.

That wasn’t so bad. Looking for more tutorials on VMs? Check out our post on connecting your virtual machine to the Internet. Also, if you prefer not to use the StarWind software, give the free Microsoft Virtual Machine Converter a try and let us know if you had any luck with it.

24 Comments

24 Comments

  1. Kari Finn

    December 25, 2016 at 12:49 am

    Why do you use a third party application to convert the VDMK file? VirtualBox includes a command line tool for that, VBoxManage.

    Simply enter this command in an elevated command prompt:
    “C:\Program Files\Oracle\Virtualbox\VBoxManage” clonehd –format SourceFileName.vmdk TargetFileName.vhd

    Downloading and installing any additional converters for this is totally unnecessary.

    • Andre Da Costa

      December 26, 2016 at 9:36 pm

      Thanks for that tip Kari!

      • Kari Finn

        December 27, 2016 at 3:58 pm

        You are welcome, although I have to apologize: I should remember to copy & paste complex commands instead of typing them, to get them correct.

        In this case, typing the sample command I forgot a very importand thing: after the –format switch you have to tell the format of new virtual disk, in this case VHD. That’s missing from my original comment.

        The correct command, this time copy & pasted from my OneNote notebook is:

        “C:\Program Files\Oracle\Virtualbox\VBoxManage” clonehd –format VHD SourceFileName.vmdk TargetFileName.vhd

        Once again, my apologies for the typo in my original comment.

        • Kari Finn

          December 27, 2016 at 4:08 pm

          Another typo, this time not my fault :)

          I noticed that this site transfers two subsequent – (minus) signs to one dash.

          The format switch in VBoxManage command is preceded by two minus signs, not a dash!

  2. Harvill Richardson

    February 7, 2017 at 10:46 pm

    Guys this is great information, in that VBox can/has the ability to export into HyperV.
    Kari, thank you for the re-posting and correction. I will be sure to utilize this (tuck away into toolbox).
    Thank you guys very much

    Rich R

  3. Rahul Sarjan

    June 12, 2017 at 6:51 pm

    Yep, helpful.

    • Jj

      September 13, 2019 at 5:10 pm

      I’m running Ubuntu on virtualbox with web file sharing system that read files from an usb disk mounted in Ubuntu using the folder share function of virtual box.
      The problem is that the read/write throughput on shared folder reach maximum 250mbps..

      With hyper v I’ve found online that I need to attach external USB disk manually each time I start the virtual machine.

      Exist a way to avoid this really annoying problem?

      Thank you.

  4. Rahul Sarjan

    June 12, 2017 at 7:43 pm

    What if .ova gets extracted to two or more .vmdk files? If I convert each part to .vhd separately, it would be incomplete. How to convert all parts .vmdk to single .vhd?

    • David Williams

      April 29, 2021 at 2:51 pm

      Did you get an answer to this question?

  5. Ibarski

    December 11, 2017 at 6:17 am

    You can minimize the converting steps amount additionally using VBOXMANAGE CLONEHD directly from *.vdi to *.vhd without EXPORT ALLIANCES.

    • Rich R

      December 11, 2017 at 7:59 pm

      Ibarski, could you please expand on the cmd you spoke of. Is this referencing .ova’s? Is the cmd similar to what Kari had posted above?
      Would it look like below?
      “C:\Program Files\Oracle\Virtualbox\VBoxManage” clonehd –format OVA SourceFileName.ova TargetFileName.vhd”
      I am wanting to understand if you are saying that the.ova file should not be outputted as a fragment using your method. Can you please expand, or provide guidance. I’m sure many would benifet from it.

  6. Ibarski

    December 12, 2017 at 10:46 pm

    And now in detail. My virtualbox guest mashine has a virtual disk file in the virtualbox
    native format xxxxx.vdi. Using Karl example a cmd command can be : C:\Program Files\Oracle\Virtualbox\VBoxManage” clonehd –format VHD SourceFileName.vdi TargetFileName.vhd. The -format parameter shows the wanted output format. My message is not to use a multistep procedure vdi-file –> vdmk-file or ova-file –> vhd-file, but make it directly. Just yesterday I have converted my virtualbox disk file ti VHD format, installed MS Hyper-V and created a new VM using the converted disk file. The last converting action was to uninstall the virtualbox extensions in the guest system ( no value for Hyper-V )

    • ibarski

      April 29, 2019 at 3:46 am

      Once more about side effects due to a transferring of Virtualbox VMs to another virtualization engine. Some software products make use of hardware bound licensing based upon a MAC address of the primary network adapter. The MAC address prefix of any network adapter ( any virtual network adapter as well ) is corresponding to the manufacturer code and is therefore hard coded by Oracle Virtualbox, MS Hyper-V etc. respectively. So some correct licensed software product may loose its license if transferred to another virtualization engine.

  7. Michael Aric Uman

    April 24, 2019 at 11:15 am

    I have used both VBox and Hyper-V and still think VBox is more ‘full-featured’ in that Oracles product has the ability to Share Folders between the host and client, and the bi-directional clipboard support works in VBox.

  8. George Brooks

    June 26, 2019 at 3:19 pm

    In addition to the above comparisons of VBox & Hyper-V, I find the inability to connect via SSH to an (import of a VBox) Ubuntu system with PuTTY a show-stopper. Multiple web searches have not revealed a solution.

    • George Brooks

      June 28, 2019 at 9:06 am

      While importing a VBox server was not successful (most likely Error 99: Replace user and try again), creating a Ubuntu 18.04 LTS server and properly connecting via an external switch was successful. This included the ability to ssh into the server from my Win 10, 1903 host.

  9. Walter Dexter

    January 26, 2020 at 12:08 pm

    Wow, I can’t thank you enough for this. I tried moving a VirtualBox Windows 10 VM from one computer to another and it just wouldn’t run. I assume the CPU changes were enough to break the HAL but Hyper-V can run it by following this process.

    A few notes:

    1. I had to make a “Generation 1” Hyper-V VM for it to be able to boot.
    2. The StarWind tool’s UI had changed dramatically in the last year.

  10. Lennie

    December 9, 2020 at 10:50 am

    Thank you, this worked for me. I had a few errors with trying to directly migrate from Oracle to HyperV, this worked like a charm

  11. Sammy

    April 4, 2021 at 1:42 am

    Hi,
    Many thanks to you all, this single page and the comments are truly clear and workable.
    Best regards

  12. Pete

    February 22, 2022 at 2:30 am

    Sorry guys, but for me, VirtualBox and all it’s features are much more better than Hyper-V. No reason to migrate. Just in case, you’re not able to use different OS than Windows :-)

    • Steve Krause

      February 22, 2022 at 9:01 am

      Hi Pete,

      One thing to keep in mind – VirtualBox is ONLY free for personal use. Commercial use requires you to pay for it. I think it’s $50 USD?

  13. Asep Sopyan

    January 31, 2023 at 10:33 pm

    I got Centos 7 vbox image from https://www.linuxvmimages.com/. But the size is too big, which is 1TB. Can I resize it to around 100GB for example. But I don’t want to create a new one, because I’ve already done a lot of work on this vbox image. And besides, I want to convert it to Hyper-V as well. Can I do this at once?

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top