Thursday, July 7, 2016

Not enough memory in the system to start the virtual machine VS Emulator 5-inch KitKat (4.4) XXHDPI

I was working on Ionic Cordova application to build hybrid mobile application. So I was working on Visual Studio 2015 with 5_KitKat_(4.4)_XXHDPI_Phone emulator. When I try to build the application it throws following error message.


Note: Detailed error message attached here.

[Window Title]
Hyper-V Manager

[Main Instruction]
An error occurred while attempting to start the selected virtual machine(s).

[Content]
'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.aruna' failed to start.

Not enough memory in the system to start the virtual machine VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.aruna.

Could not initialize memory: Ran out of memory (0x8007000E).

[Expanded Information]
'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.aruna' failed to start. (Virtual machine ID A4BF6A21-24C9-4B6A-BCC5-FD06404B08B3)

Not enough memory in the system to start the virtual machine VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.aruna with ram size 4096 megabytes. (Virtual machine ID A4BF6A21-24C9-4B6A-BCC5-FD06404B08B3)

'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.aruna' could not initialize memory: Ran out of memory (0x8007000E). (Virtual machine ID A4BF6A21-24C9-4B6A-BCC5-FD06404B08B3)

I started wandering in the Visual Studio installations folders on my PC, to check where the heck it was forcing the starting RAM of the emulator to be exactly 2048 MB.

It was located in:
C:\Users\[YourUserName]\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices


Now you will just have to open each one of them and change this line content, replacing the “2048” value with “1024”:



FROM: device.vm.ram.size=2048

TO: device.vm.ram.size=1024

Well, this is what worked for me! Hope this will help someone else as well.

5 comments:

  1. Please let me know if you're looking for a author for your site. You have some really great posts and I believe I would be a good asset. If you ever want to take some of the load off, I'd love to write some material for your blog in exchange for a link back to mine. Please shoot me an e-mail if interested. Cheers!
    computer it support perth

    ReplyDelete
  2. Awesome post. Even after 5 years still valid! (although I used the screenshots from Fix Ran out of memory 0x8007000E in Hyper-V to make your solution valid for Windows 10 :)

    ReplyDelete
  3. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.

    visual inspection machine

    ReplyDelete