I need to run an azure vm in my local PC. Intuitively I did the following:

1) Downloaded the virtual machine's disk (VHD) using Azure Storage Explorer

2) Configured a new virtual machine in Virtual Box

3) Tried to add the VHD disk image downloaded from azure

4) Clicked Accept (later I discovered the disk was not set)

5) Started the VM

6) The VM started with a different disk image (the latest one I used)

When I start the machine, it automattically switches to the latests image that I opened (another VM)

VB does not show any error, it just changes to the former disk image and starts the vm as if I never configured the disk I downloaded from azure.

The VHD file is correct, I compared the size and checksum MD5 and they are correct.

What am I doing wrong?


The problem, as I discovered later, is that VirtualBox doesn't like the VHD disk image at all. I manually added it to the SATA controller but VB does not set it:

enter image description here

enter image description here

  • I find it very hard to believe VirtualBox would just do random stuff like that. Please describe in greater detail how you set up the VM and what exactly happens. How did you determine it’s using the wrong disk image? – Daniel B Jul 29 '17 at 11:16
  • @danielB I edited the question and added step by step what I did. – Yván Ecarri Jul 30 '17 at 8:16
  • Are you sure it’s a VHD file and not a VHDX file? – Daniel B Jul 30 '17 at 8:55
  • @danielB, thanks for you help and interest. The file was created automatically when I created a virtual machine (not classic) in Azure Portal. I think it creates standard VHD files (not VHDX) – Yván Ecarri Jul 30 '17 at 9:12
  • You can check the file type using your favorite hex editor. I recommend HxD. Does it start with the four letters vhdx? – Daniel B Aug 1 '17 at 8:45

I was able to start the image using Hyper-V instead of VirtualBox. It seems VB doesn't like the file format from Azure.

A drawback is that Virtual Box support for 64bits is disabled when Hyper-V is enabled.


In order to use *.vhd Azure VM images on local pc you need to use Hyper-V instead of VirtualBox or VMWare.

But in order to use /enable Hyper-V in your pc, you must have a compatible version of the Windows 10.

refer this link: Windows 10 Hyper-V System Requirements

If you have a compatible Windows 10 Operating System, activate Hyper-V using following commands,

  • Open an elevated command prompt. (Administrator mode)
  • Use DISM command,

    dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

  • add VT-x role to Hyper-V

    bcdedit /set hypervisorlaunchtype auto

  • "Restart" the PC.

Note that after enabling VT-x role to Hyper-V you are no longer able to use any kind of 3rd party Virtual service, or even emulators such as VMWare, VirtualBox, Genymotion, Bluestacks etc... So make sure you disable the VT-x role after you finish your Hyper-V scenarios. Otherwise BSODs will occur.

To disable VT-x from Hyper-V and enable it to other Virtual Services (VMWare, VirtualBox, etc...)

  • Open an elevated command prompt. (Administrator mode)

    bcdedit /set hypervisorlaunchtype off

  • "Restart" the PC.

To disable Hyper-V role from PC,

  • Open an elevated command prompt. (Administrator mode)

  • Use DISM command,

    dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All

  • "Restart" the PC.


According to your screenshot, I guess you have not select the right VHD. We download the VHD to local, the name should be xxxx.vhd, not .vdi.

Create new virtual machine with VHD, like this:

enter image description here

Here a article about run Microsoft VHD file on VirtualBox, please refer to it.

MS recommend to use Hyper-v to run Azure VM image, maybe we can use Hyper-v to run your image.

  • The name is *.vhd, as displayed in the file open dialog. VirtualBox does not accept the file. – Daniel B Jul 31 '17 at 5:52
  • Sorry, I think I did not explain myself. I know the VDI is not the right disk. The problem is that I selected the OSOFT-U012.....vhd BUT virtual box rejected it and switched to the vdi automatically. – Yván Ecarri Jul 31 '17 at 12:57
  • More information: I was able to start the image using Hyper-V instead of VirtualBox. It seems VB doesn't like the file format. – Yván Ecarri Jul 31 '17 at 17:03
  • @Y.Ecarri Yes, MS recommend to use Hyper-v to run Azure VM image. Maybe we should use Hyper-V to run your image. – Jason Ye Aug 1 '17 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.