Skip to content

vb.customize ["modifyvm", :id, "--ioapic", "on"] line makes vagrant unable to start Virtual Machine on Windows 10 #81

Closed
@ludi889

Description

@ludi889

Enviroment:

Edition Windows 10 Home
Version 21H2
Installed on ‎05.‎02.‎2021
OS build 19044.1586
Experience Windows Feature Experience Pack 120.2212.4170.0

Device name DESKTOP-LO0BGQ3
Processor AMD Ryzen 5 4600H with Radeon Graphics 3.00 GHz
Installed RAM 8,00 GB (7,37 GB usable)
Device ID A1615C0C-050E-4712-A965-46001436FFD8
Product ID 00326-30000-00001-AA492
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Synops

The course makes the user use "vagrant up" command with pre-prepared Vagrantfile:

# set up the default terminal
ENV["TERM"]="linux"

# set minimum version for Vagrant
Vagrant.require_version ">= 2.2.10"
Vagrant.configure("2") do |config|
  config.vm.provision "shell",
    inline: "sudo su - && zypper update && zypper install -y apparmor-parser"

  # Set the image for the vagrant box
  config.vm.box = "opensuse/Leap-15.2.x86_64"
  # Set the image version
  config.vm.box_version = "15.2.31.632"

  # Forward the ports from the guest VM to the local host machine
  config.vm.network "forwarded_port", guest: 8080, host: 8080
  config.vm.network "forwarded_port", guest: 6111, host: 6111
  config.vm.network "forwarded_port", guest: 6112, host: 6112

  # Set the static IP for the vagrant box
  config.vm.network "private_network", ip: "192.168.50.4"
  

  # Configure the parameters for VirtualBox provider
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "4096"
    vb.cpus = 4
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
  end
end

Unfortunately, when trying to spin it up it gets stuck during waiting on SSH connection to VM:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key

It seems like the process of creating VM is getting stuck during device management setup

Proposed resolution

After deleting line:
vb.customize ["modifyvm", :id, "--ioapic", "on"]
VM starts up correctly and does not hang on SSH connection moment.

So, after modification, Vagrantfile is:

# set up the default terminal
ENV["TERM"]="linux"

# set minimum version for Vagrant
Vagrant.require_version ">= 2.2.10"
Vagrant.configure("2") do |config|
  config.vm.provision "shell",
    inline: "sudo su - && zypper update && zypper install -y apparmor-parser"

  # Set the image for the vagrant box
  config.vm.box = "opensuse/Leap-15.2.x86_64"
  # Set the image version
  config.vm.box_version = "15.2.31.632"

  # Forward the ports from the guest VM to the local host machine
  config.vm.network "forwarded_port", guest: 8080, host: 8080
  config.vm.network "forwarded_port", guest: 6111, host: 6111
  config.vm.network "forwarded_port", guest: 6112, host: 6112

  # Set the static IP for the vagrant box
  config.vm.network "private_network", ip: "192.168.50.4"
  

  # Configure the parameters for VirtualBox provider
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "4096"
    vb.cpus = 4
  end
end

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions