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

Vagrantfile provider customization in box no longer gets merged with project Vagrantfile #3996

Closed
sykesm opened this Issue Jun 8, 2014 · 7 comments

Comments

Projects
None yet
5 participants
@sykesm

sykesm commented Jun 8, 2014

I'm trying to work with the boot2docker-vagrant-box with Vagrant 1.6.3. What I'm seeing is that some of the vmx customizations present in the boot2docker-vagrant-box's Vagrantfile get lost when the project's Vagrantfile contains config.vm.provider "vmware_fusion".

In particular, the box's Vagrantfile contains the following:

  ["vmware_fusion", "vmware_workstation"].each do |vmware|
    config.vm.provider vmware do |v|
      v.vmx["bios.bootOrder"]    = "CDROM,hdd"
      v.vmx["ide1:0.present"]    = "TRUE"
      v.vmx["ide1:0.fileName"]   = File.expand_path("../boot2docker-vagrant.iso", __FILE__)
      v.vmx["ide1:0.deviceType"] = "cdrom-image"
    end
  end

When the project's Vagrantfile looks like this:

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "boot2docker-0.8.0"
end

the cdrom is configured in the vmx and the iso gets mounted; things work as expected:

.encoding = "UTF-8"
bios.bootorder = "CDROM,hdd"
...
ide1:0.devicetype = "cdrom-image"
ide1:0.filename = "/Users/sykesm/.vagrant.d/boxes/boot2docker-0.8.0/0/vmware_desktop/boot2docker-vagrant.iso"
ide1:0.present = "TRUE"
...

When the project's Vagrantfile looks like this:

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "boot2docker-0.8.0"

  config.vm.provider "vmware_fusion" do |v, override|
    v.vmx["memsize"] = "2048"
    v.vmx["numvcpus"] = "2"
  end
end

the customization from the box's Vagrantfile disappear and the cdrom configuration disappears from the vmx:

.encoding = "UTF-8"
bios.bootorder = "hdd,CDROM"
...
ide1:0.devicetype = "cdrom-raw"
ide1:0.filename = "auto detect"
ide1:0.present = "TRUE"
...
memsize = "2048"
numvcpus = "2"
...

This works if I downgrade to Vagrant 1.5.4 so it seems related to a change in the 1.6 series.

For what it's worth, this seems to be the pattern used by dvm and that's how I've stumbled onto it.

@fnichol

This comment has been minimized.

fnichol commented Jun 8, 2014

I'm not 100% but it appears to be be bad6537 that caused the change in behavior, at least for the vmware_fusion driver's point of view. I'm pretty sure that there has not been an update to the vagrant-vmware-fusion driver since 2.4.1, so perhaps there is a corresponding fix to be made there?

@mitchellh

This comment has been minimized.

Member

mitchellh commented Jun 9, 2014

Thanks, I thought I fixed this in the VMware provider but I'll see if this is happening in core too.

@mitchellh mitchellh added the bug label Jun 9, 2014

@fnichol

This comment has been minimized.

fnichol commented Jun 9, 2014

@mitchellh anything I can do to help/verify, don't hesitate to ask. Thanks!

@adambiggs

This comment has been minimized.

adambiggs commented Jun 18, 2014

Is there a temporary workaround for this problem?

@superstructor

This comment has been minimized.

superstructor commented Jul 6, 2014

@adambiggs Downgrading to Vagrant 1.5.4 was the only workaround for me.

@mitchellh

This comment has been minimized.

Member

mitchellh commented Oct 24, 2014

This should be fixed.

@mitchellh mitchellh closed this Oct 24, 2014

@mitchellh

This comment has been minimized.

Member

mitchellh commented Oct 24, 2014

(Requires latest version of the vagrant vmware plugins)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment