StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.28k stars 430 forks source link

Error when building VirtualBox image on Linux with AMD processor #317

Open amotl opened 2 years ago

amotl commented 2 years ago

Dear Stefan, dear community,

while this command works well on my macOS workstation [^1],

packer build --only=virtualbox-iso windows_2019_docker.json

it croaks on a Linux machine [^2], like

Error starting VM: VBoxManage error: VBoxManage: error: Could not launch the VM process for the machine 'WindowsServer2019Docker' (VERR_FILE_NOT_FOUND)

Is anyone observing the same problem?

With kind regards, Andreas.


The complete error message is:

Build 'virtualbox-iso' errored after 16 seconds 283 milliseconds: Error starting VM: VBoxManage error: VBoxManage: error: Could not launch the VM process for the machine 'WindowsServer2019Docker' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LaunchVMProcess(a->session, sessionType.raw(), ComSafeArrayAsInParam(aBstrEnv), progress.asOutParam())" at line 726 of file VBoxManageMisc.cpp

[^1]: Intel Core i9, macOS 10.15.7 (Catalina), Mach 19.6.0, VirtualBox 6.1.34, Vagrant 2.2.19, Packer 1.8.1. All application software installed via Homebrew. [^2]: AMD Ryzen 9, Ubuntu 20.04.4 LTS (Focal Fossa), Linux 5.4.0-97, VirtualBox 6.1.32, Vagrant 2.2.19, Packer 1.8.1. Vagrant and Packer are installed from the HashiCorp package repository.

amotl commented 2 years ago

The Packer repository has four issues about VERR_FILE_NOT_FOUND. Most of them are pretty old, but https://github.com/hashicorp/packer/issues/8911 stands out.

Over there, @SwampDragons suggested at https://github.com/hashicorp/packer/issues/8911#issuecomment-601347662:

This isn't a Packer issue. It is a Vagrant + Virtualbox issue that needs to be fixed inside your VagrantFile. Here are some resources to help: