Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant up: An error occurred while executing vmrun, a utility for controlling VMware machines. The command and output are below: #12769

Closed
StalkerOne opened this issue May 17, 2022 · 14 comments

Comments

@StalkerOne
Copy link

StalkerOne commented May 17, 2022

My running environment

Vagrant 2.2.19
vagrant-vmware-utility 1.0.21
MacOS Monterey 12.3 for Apple M1 Pro chip

When i run:
vagrant box add hashicorp/bionic64
vagrant up

----------------------- output ----------------------

Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Box 'hashicorp/bionic64' could not be found. Attempting to find and install...
default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
default: Box Version: >= 0
==> default: Loading metadata for box 'hashicorp/bionic64'
default: URL: https://vagrantcloud.com/hashicorp/bionic64
==> default: Adding box 'hashicorp/bionic64' (v1.0.282) for provider: vmware_desktop
default: Downloading: https://vagrantcloud.com/hashicorp/boxes/bionic64/versions/1.0.282/providers/vmware_desktop.box
==> default: Successfully added box 'hashicorp/bionic64' (v1.0.282) for 'vmware_desktop'!
==> default: Cloning VMware VM: 'hashicorp/bionic64'. This can take some time...
==> default: Checking if box 'hashicorp/bionic64' version '1.0.282' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
An error occurred while executing vmrun, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "/Users/stalker/Virtual Machines.localized/.vagrant/machines/default/vmware_desktop/146d5222-4d8b-4823-802c-b7d2a394dd5f/ubuntu-18.04-amd64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: 2022-05-17T10:43:12.439| ServiceImpl_Opener: PID 93242
Error: The operation was canceled

Stderr:


so, what should i do?

@martincarre
Copy link

martincarre commented Jun 30, 2022

Hey StalkerOne.

I've got the same here.
I tried to follow a bunch a solutions found on another GitHub thread but none of them worked:

I don't know if you managed to find a solution, it's really fustrating using Vagrant with M1 macs btw.

Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Cloning VMware VM: 'bento/ubuntu-16.04'. This can take some time...
==> default: Checking if box 'bento/ubuntu-16.04' version '202112.19.0' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "/Users/user/Downloads/FSND-Virtual-Machine/vagrant/.vagrant/machines/default/vmware_desktop/33ec4a48-c5fa-4636-b7f9-2627482c292c/ubuntu-16.04-amd64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: 2022-06-30T16:40:37.649| ServiceImpl_Opener: PID 17466
Error: The operation was canceled

Stderr:

My config:
macOS Monterey - 12.4 (21F79)
Vagrant 2.2.19
vagrant-vmware-utility 1.0.21
VMWare Fusion Professional Version e.x.p (19431034)

@martincarre
Copy link

martincarre commented Jun 30, 2022

OK. Sorry. I'm going to answer to my own intervention because by looking at the vmware.log located in .vagrant/machines/default/vmware_desktop/STRANGEVMNUMBER/ folder, I got:
2022-06-30T14:40:38.157Z In(05) vmx [msg.guestos.badArch] This virtual machine cannot be powered on because it requires the X86 machine architecture, which is incompatible with this Arm machine architecture host. See KB-84273.

and so I tried to find a bento/ubuntu version for arm but there's only one that works on Parallels provider: here.

Let me know if you know of another magical place where I could find this build but for vmware.

@ian28223
Copy link

ian28223 commented Oct 12, 2022

Just curious, can you try adding the following to your Vagrantfile?

provider: vmware_desktop

    config.vm.provider “vmware_desktop” do |v|
        v.gui = true 
    end

provider: virtualbox

    config.vm.provider “virtualbox” do |v|
        v.gui = true 
    end

@lassieee
Copy link

Just curious, can you try adding the following to your Vagrantfile?

    config.vm.provider “vmware_desktop” do |v|
        v.gui = true 
    end

Nice! It boots when v.gui = true.
Thank you!

@strom18
Copy link

strom18 commented Nov 26, 2022

Just curious, can you try adding the following to your Vagrantfile?

    config.vm.provider “vmware_desktop” do |v|
        v.gui = true 
    end

this fix the issue for me too. Thanks !

@MichaelCain2
Copy link

MichaelCain2 commented Feb 26, 2023

I have tried adding the above to my Vagrantfile. Perhaps I am adding it incorrectly but it keeps yelling at me that it needs an end.

StefanScherer-windows_2019 % vagrant up
Vagrant failed to initialize at a very early stage:

There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:

/Users/stryker/VirtualBox VMs/StefanScherer-windows_2019/Vagrantfile:72: syntax error, unexpected end-of-input, expecting `end'

Here is what I added
config.vm.provider “vmware_desktop” do |v|
v.gui = true
end

image

I am running an M1. I am using BBEdit to edit. Perhaps it is some issue. I tried VIM but it is formatted the same.

@ian28223
Copy link

I have tried adding the above to my Vagrantfile. Perhaps I am adding it incorrectly but it keeps yelling at me that it needs an end.

StefanScherer-windows_2019 % vagrant up
Vagrant failed to initialize at a very early stage:

There is a syntax error in the following Vagrantfile. The syntax error message is reproduced below for convenience:

/Users/stryker/VirtualBox VMs/StefanScherer-windows_2019/Vagrantfile:72: syntax error, unexpected end-of-input, expecting `end'

Here is what I added config.vm.provider “vmware_desktop” do |v| v.gui = true end

image

I am running an M1. I am using BBEdit to edit. Perhaps it is some issue. I tried VIM but it is formatted the same.

you're probably just missing another end

@MichaelCain2
Copy link

I guess I am just not understanding where that end goes. I have tried to put the new stanza at the end, in between and only get other errors.

Like so. Different end locations. One it with original end in place, stanza placed after and second is end in original place and stanza with end before

Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/stryker/VirtualBox VMs/StefanScherer-windows_2019/Vagrantfile
Line number: 0
Message: NameError: undefined local variable or method `config' for main:Object
stryker@StrybookPro StefanScherer-windows_2019 % vagrant up
Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
an invalid or undefined variable.

Path: /Users/stryker/VirtualBox VMs/StefanScherer-windows_2019/Vagrantfile
Line number: 0
Message: undefined local variable or method `“vmware_desktop”'

image

image

@MichaelCain2
Copy link

All of my vagrants work on my Alienware but i need to get it enabled on this Mac

@ian28223
Copy link

ian28223 commented Feb 26, 2023

oh right, you have virtualbox as a provider, so change vmware_desktop to virtualbox.
If above doesn't help, I also just remembered that virtualbox is still in beta for M1

@MichaelCain2
Copy link

I actually had both VirtualBox and VMware. Decided to delete everything and try from scratch again. I will just go with VMWare on the Mac. My ALienware I use Virtualbox and do have everything working there. I am more or less doing proof of concept because I have to ultimately get a Win 2019 Server that I can install Mirth Connect to test installing AppDynamics Java agent. Have issues in work environment that I think has to be STIG related because it is just a java app. Anyways, I will let you know after I fidget with re-deploying everything. If you think I should use Virtualbox over VMware or something else, please feel free to let me know. Since I used the same advice installing, I am expecting the same issues on this ARM processor :P

@ian28223
Copy link

ian28223 commented Feb 27, 2023

At this time of writing, I believe your current usable options in running a Windows guest on Apple Silicon M1/M2 chips are VMware tech preview, UTM, or Parallels.
With Virtual box on M1, you can install it and maybe run 32-bit ARM-based OS's that would be painfully slow and unusable anyway.


Anyhoo, this is would be unrelated to current Github issue re: Vagrant + VMware generating An error occurred while executing vmrun...

@MichaelCain2
Copy link

MichaelCain2 commented Feb 28, 2023 via email

@chrisroberts
Copy link
Member

Hi everybody,

The cause of this issue has been documented here and is now resolved by upgrading your Vagrant installation.

Cheers!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants