EuroLinux / cloud-images-rfc

This repository contains Requests for Change in EuroLinux made cloud images.
https://app.vagrantup.com/eurolinux-vagrant
9 stars 0 forks source link

[BUG] Error on starting vagrant using eurolinux-vagrant/centos-stream-9 #10

Closed LeeJunNakao closed 4 months ago

LeeJunNakao commented 6 months ago

Describe the bug When I run "vagrant up" always throw this error and stop execution.

Vagrant version: 2.4.1 Virtual box: 6.1.50 OS: Ubuntu 22.04.4 LTS - jammy

Vagrantfile

Vagrant.configure("2") do |config|
  config.hostmanager.enabled = true 
  config.hostmanager.manage_host = true

### DB vm  ####
  config.vm.define "db01" do |db01|
    db01.vm.box = "eurolinux-vagrant/centos-stream-9"
    db01.vm.hostname = "db01"
    db01.vm.network "private_network", ip: "192.168.56.15"

    db01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end

  end

### Memcache vm  #### 
  config.vm.define "mc01" do |mc01|
    mc01.vm.box = "eurolinux-vagrant/centos-stream-9"
    mc01.vm.hostname = "mc01"
    mc01.vm.network "private_network", ip: "192.168.56.14"

    mc01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
    end

    config.vm.provision "shell", inline: <<-SHELL
      dnf install -y kernel-devel-$(uname -r)
    SHELL
  end

### RabbitMQ vm  ####
  config.vm.define "rmq01" do |rmq01|
    rmq01.vm.box = "eurolinux-vagrant/centos-stream-9"
  rmq01.vm.hostname = "rmq01"
    rmq01.vm.network "private_network", ip: "192.168.56.13"

    rmq01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end
  end

### tomcat vm ###
   config.vm.define "app01" do |app01|
    app01.vm.box = "eurolinux-vagrant/centos-stream-9"
    app01.vm.hostname = "app01"
    app01.vm.network "private_network", ip: "192.168.56.12"

    app01.vm.provider "virtualbox" do |vb|
     vb.memory = "800"
   end
   end

### Nginx VM ###
  config.vm.define "web01" do |web01|
    web01.vm.box = "ubuntu/jammy64"
    web01.vm.hostname = "web01"
  web01.vm.network "private_network", ip: "192.168.56.11"

  web01.vm.provider "virtualbox" do |vb|
     vb.gui = true
     vb.memory = "800"
   end
end

end

Log error:

mc01: SSH auth method: private key
    mc01: Warning: Connection reset. Retrying...
==> mc01: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
[mc01] GuestAdditions seems to be installed (7.0.14) correctly, but not running.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
Redirecting to /bin/systemctl start vboxadd.service
Job for vboxadd.service failed because the control process exited with error code.
See "systemctl status vboxadd.service" and "journalctl -xeu vboxadd.service" for details.
Redirecting to /bin/systemctl start vboxadd-service.service
Job for vboxadd-service.service failed because the control process exited with error code.
See "systemctl status vboxadd-service.service" and "journalctl -xeu vboxadd-service.service" for details.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel 
5.14.0-427.el9.x86_64. Please install them and execute
  /sbin/rcvboxadd setup
File context for /opt/VBoxGuestAdditions-7.0.14/other/mount.vboxsf already defined, modifying instead
VirtualBox Guest Additions: reloading kernel modules and services
VirtualBox Guest Additions: unable to load vboxguest kernel module, see dmesg
VirtualBox Guest Additions: kernel modules and services were not reloaded
The log file /var/log/vboxadd-setup.log may contain further information.
==> mc01: Checking for guest additions in VM...
    mc01: No guest additions were detected on the base box for this VM! Guest
    mc01: additions are required for forwarded ports, shared folders, host only
    mc01: networking, and more. If SSH fails on this machine, please install
    mc01: the guest additions and repackage the box to continue.
    mc01: 
    mc01: This is not an error message; everything may continue to work properly,
    mc01: in which case you may ignore this message.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/usr/sbin/rcvboxadd setup

Stdout from the command:

VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel 
5.14.0-427.el9.x86_64. Please install them and execute
  /sbin/rcvboxadd setup
File context for /opt/VBoxGuestAdditions-7.0.14/other/mount.vboxsf already defined, modifying instead
VirtualBox Guest Additions: reloading kernel modules and services
VirtualBox Guest Additions: unable to load vboxguest kernel module, see dmesg

Stderr from the command:

VirtualBox Guest Additions: kernel modules and services were not reloaded
The log file /var/log/vboxadd-setup.log may contain further information.

To Reproduce

Steps to reproduce the behavior:

  1. bash: vagrant up

Expected behavior Start machine successfully.

AlexBaranowski commented 4 months ago

Sorry for such late response.

Could you change the amount of memory?

     vb.memory = "600"

to the:

     vb.memory = "1500"

And simillary for others values?

Generally speaking the CentOS Stream 9 and other Enterprise Linuxes require at least 1GiB memory. 1.5 GiB is even safer bet.

AlexBaranowski commented 4 months ago

Dear @LeeJunNakao,

Sorry for bothering you, but I tried to run EL9 with 600 MiB of RAM, and it failed. If you could check if changing the memory value to a greater value (like 1500 MiB) fixes issues on your host/computer, I would be obligated to do so.

In another case, I will close this issue within a few days.

Best, Alex Baranowski

AlexBaranowski commented 4 months ago

@LeeJunNakao Thank You for your report, as there is no comment for proposed solution, and the amount of memory was clearly set to to low and it's reproducible I close this issue.

Best, Alex

AlexBaranowski commented 4 months ago

In any case feel free to create a new one if there is need.