fr123k / vagrant-boxes

MIT License
0 stars 1 forks source link

Box ubuntu21-minikube fails under VirtualBox Windows #1

Open ealaney opened 3 years ago

ealaney commented 3 years ago

Summary

Box fr123k/ubuntu21-minikube when using the VirtualBox provider under Windows fails to start. Problem appears to be the serial port configuration.

Observed Behavior

When provisioning, Vagrant halts with an error from VirtualBox:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "da4d52d9-4011-49db-bc93-fe5aa1e3078a", "--type", "gui"]

Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file /dev/null (VERR_PATH_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

Expected Behavior

Vagrant provisions the box, VirtualBox starts the VM, the VM is available to receive commands via vagrant ssh.

Repeatability

Occurs every time. Unfortunately, I only have VirtualBox / Windows available for testing at this time.

Additional Problem Details

VirtualBox logs reveal the problem is with the VM configuration of serial port COM1. It is attempting to use a Raw File with a filepath of /dev/null. This path is invalid under Windows.

Available Workaround

Configuring the Vagrantfile with additional parameters corrects the problem by overriding the box default settings and turning off COM1:

    cfg.vm.provider "virtualbox" do |vb, override|
      vb.customize ["modifyvm", :id, "--uart1", "off"]
    end

Proposed Solution

As most users will not need serial ports for Kubernetes work, disable COM1 completely in the upstream VM.

pussinboots commented 2 years ago

Thanks for the proposed solution.

Will add this to the general documentation.