ansible-for-devops icon indicating copy to clipboard operation
ansible-for-devops copied to clipboard

geerlingguy/ubuntu2004 needs 2 CPUs

Open RanchoHam opened this issue 3 years ago • 3 comments

Environment:

  • MS Surface Pro 8 16GB memory 1TB SSD
  • Windows 11 Pro
  • Virtual Box Version 6.1.34 r150636 (Qt5.6.2)
  • WSL2 with Ubuntu 20.04 LTS installed
  • Vagrant 2.2.19
  • Fresh ansible-for-devops clone All software is at the latest update

Problem: In the drupal directory vagrant up fails with the message:

The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'paused' state. ... Examination of the Virtual Box console shows the boot stopped because of a kernel panic

Manual Solution:

  1. After failure, power off the virtual machine
  2. Open the Virtual Box GUI
  3. Open settings for the virtual machine that failed
  4. Select the System window
  5. Select the Processor tab
  6. Increasing the number of processors to 2 will allow the VM to start.

How can the base box be modified to use 2 processors?

RanchoHam avatar Jun 10 '22 17:06 RanchoHam

I found that modifying the Vagrantfile by adding the following line: v.customize "pre-boot", ["modifyvm", :id, "--cpus", 2], to the config.vm.provider :virtualbox do |v| loop will modify the the number of CPUs allocated to the VM.

RanchoHam avatar Jun 15 '22 22:06 RanchoHam

@RanchoHam I ran into this as well. The proper way to do this in Vagrant is to use v.cpus = 2 in the config.vm.provider loop.

ellisgeek avatar Jun 17 '22 16:06 ellisgeek

why this issue is still open ?? I think it got resolved by now @RanchoHam ?

DdeathCoder avatar Nov 24 '22 21:11 DdeathCoder