Closed GWillard57 closed 4 years ago
Hi.
This is nothing to do with the build. The error is caused because VirtualBox can't get a contiguous chunk of memory for the VM. The main point it right at the end of the error stack.
Cannot allocate memory (RuntimeError)
When VirtualBox is creating a VM it looks for a contiguous chunk of memory for the VM. If it can't find it, it fails. This happens independently of Vagrant or any specific build. It's the way VirtualBox works. I rarely see this on macOS or Linux hosts, but these days I do most of the development on Windows 10, and I see it quite a bit.
I have a 32G RAM laptop, and sometimes I've seen this when I've had over 20G of free memory. Why? Because a number of programs are running, and their memory is scattered across the RAM, so there is no single chunk of memory big enough for VirtualBox to use. I don't see this often for smaller VMs (<= 4G RAM), but it happens a lot for the larger VMs, such as those for RAC and Enterprise Manager.
The only option is to try closing down some programs and try again. Eventually you will free up a big enough block of memory to allow the VM to run.
Of course, if you are trying to use more memory than is currently available on your machine, that's not going to work.
So as I said, this is not a fault in my build, or how Vagrant works. It is a VirtualBox issue.
Cheers
Tim...
==> default: Forcing shutdown of VM... ==> default: Destroying VM and associated drives... Traceback (most recent call last): 36: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in
block in call' 35: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:63:in
wait_for_ready' 34: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:108:intimeout' 33: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:in
catch' 32: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:incatch' 31: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:in
block in catch' 30: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:93:inblock in timeout' 29: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:88:in
block in wait_for_ready' 28: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:192:inready?' 27: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/guest.rb:43:in
capability' 26: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/capability_host.rb:111:incapability' 25: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/capability_host.rb:111:in
call' 24: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/guests/linux/cap/public_key.rb:14:ininsert_public_key' 23: from /opt/vagrant/embedded/lib/ruby/2.6.0/tempfile.rb:295:in
open' 22: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/guests/linux/cap/public_key.rb:19:inblock in insert_public_key' 21: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:307:in
upload' 20: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:740:inscp_connect' 19: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:391:in
connect' 18: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:742:inblock in scp_connect' 17: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:337:in
block in upload' 16: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:331:inblock (2 levels) in upload' 15: from /opt/vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:284:in
upload!' 14: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:272:inwait' 13: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in
loop' 12: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:inloop' 11: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in
block in loop' 10: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:inprocess' 9: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:29:in
process' 8: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:inev_preprocess' 7: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in
each' 6: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:250:inev_preprocess' 5: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:540:in
each_channel' 4: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:540:ineach' 3: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:250:in
block in ev_preprocess' 2: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:323:inprocess' 1: from /opt/vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:369:in
block (3 levels) in start_command' /opt/vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:398:in `await_response_state': scp: /tmp/vagrant-insert-pubkey-1595053863: Cannot allocate memory (RuntimeError)