oraclebase / vagrant

Vagrant Builds
https://oracle-base.com/
GNU General Public License v3.0
190 stars 167 forks source link

Error from the scripts #8

Closed GWillard57 closed 4 years ago

GWillard57 commented 4 years ago

==> 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:inwait_for_ready' 34: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:108:in timeout' 33: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:incatch' 32: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:in catch' 31: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:33:inblock in catch' 30: from /opt/vagrant/embedded/lib/ruby/2.6.0/timeout.rb:93:in block in timeout' 29: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:88:inblock in wait_for_ready' 28: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:192:in ready?' 27: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/guest.rb:43:incapability' 26: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/capability_host.rb:111:in capability' 25: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/capability_host.rb:111:incall' 24: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/guests/linux/cap/public_key.rb:14:in insert_public_key' 23: from /opt/vagrant/embedded/lib/ruby/2.6.0/tempfile.rb:295:inopen' 22: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/guests/linux/cap/public_key.rb:19:in block in insert_public_key' 21: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:307:inupload' 20: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:740:in scp_connect' 19: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:391:inconnect' 18: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:742:in block in scp_connect' 17: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:337:inblock in upload' 16: from /opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/communicators/ssh/communicator.rb:331:in block (2 levels) in upload' 15: from /opt/vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:284:inupload!' 14: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:272:in wait' 13: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:inloop' 12: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in loop' 11: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:inblock in loop' 10: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:in process' 9: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:29:inprocess' 8: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in ev_preprocess' 7: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:ineach' 6: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:250:in ev_preprocess' 5: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:540:ineach_channel' 4: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:540:in each' 3: from /opt/vagrant/embedded/gems/2.2.9/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:250:inblock 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:in process' 1: from /opt/vagrant/embedded/gems/2.2.9/gems/net-scp-1.2.1/lib/net/scp.rb:369:inblock (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)

oraclebase commented 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...