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 fails with a VBoxManage Invalid MAC address #781

Closed
lmayorga1980 opened this issue Jan 3, 2014 · 7 comments
Closed

vagrant up fails with a VBoxManage Invalid MAC address #781

lmayorga1980 opened this issue Jan 3, 2014 · 7 comments

Comments

@lmayorga1980
Copy link
Contributor

First time fails but second time i execute vagrant up it just works fine.

Vagrant 1.4.2
VirtualBox 4.3.6

Gist: https://gist.github.com/lmayorga1980/8230516

@lmayorga1980
Copy link
Contributor Author

Vagrant File https://gist.github.com/lmayorga1980/8238624 shipped as a template on the packer .json file.

@pdex
Copy link

pdex commented Feb 3, 2014

I'm getting the same issue.

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

Command: ["modifyvm", "8a4ff65a-d73e-4b1b-bb86-ea9fa5d938f5", "--macaddress1", "{{ .BaseMacAddress }}"]

Stderr: VBoxManage: error: Invalid MAC address format
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component NetworkAdapter, interface INetworkAdapter, callee nsISupports
VBoxManage: error: Context: "COMSETTER(MACAddress)(Bstr(ValueUnion.psz).raw())" at line 1663 of file VBoxManageModifyVM.cpp

https://github.com/mitchellh/packer/blob/master/post-processor/vagrant/virtualbox.go#L162-L166

It looks like Packer is adding this to the Vagrantfile that gets added to the box, but the template substitution isn't working. Is there a way to disable Packer's default Vagrantfile?

@pdex
Copy link

pdex commented Feb 3, 2014

Nevermind, packer is doing the right thing, vagrant doesn't blow away the existing box Vagrantfile in .vagrant.d.

@pr0xr
Copy link

pr0xr commented Feb 3, 2014

Yes this is a common issue for newer versions of packer using old embeddable vagrantfiles.

@liamjbennett
Copy link

I am still seeing this issue with:
Vagrant 1.4.3
Packer 0.5.1
Virtualbox 4.3

@pr0xr
Copy link

pr0xr commented Feb 4, 2014

The issue must be fixed by user creating the vagrant box. The issue seems to happen when you embed vagrantfiles as a template with this setting:

config.vm.base_mac = "{{ .BaseMacAddress }}"

Remove, rebuild and the issue is gone.

@mitchellh
Copy link
Contributor

This is fixed

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
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

5 participants