hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Two Directories Created During Vagrant Up Virtualbox on Windows 7 x64 Vagrant 1.4+ #3822

Closed LevonBecker closed 10 years ago

LevonBecker commented 10 years ago

When I vagrant up a bare bones vagrantfile (Just has config.vm.box)... or of course one of my full blown configurations... a folder is created while it clones the VM virtual disk in VirtualBox VMs. Then when the clone is completed a second folder is created using the randomly generated VM name. In this second folder is the Logs subfolder, .vbox and .vbox-prev files.

If a config.vm.customize is used the second folder is renamed to your specified VM/hostname, but they are still seperate folders never merged together or just renamed.

Also, if you then fire up another one using the same box image it clones it's virtual disk into the same first directory.

Then when I add another virtual disk on the provisioning it is created in the second folder because of how I have coded it.

I guess the first question would be.. is this expected behavior? If not, do you know how I can fix it or what I'm doing wrong?

With the same box image it DOES NOT do this if I'm using 1.3.5. As soon and I upgrade 1.4+ is when the behavior starts.

Thanks!

-=Levon

Example

  1. mkdir temp
  2. cd temp
  3. vagrant init vagrant init chef/centos-6.5
  4. vagrant up
%userprofile%\Virtualbox VMs\
+---chef_centos_6_5_default_1400277636750_27030
|   |   chef_centos_6_5_default_1400277636750_27030.vbox
|   |   chef_centos_6_5_default_1400277636750_27030.vbox-prev
|   |
|   \---Logs
|           VBox.log
|
\---packer-centos-6.5-x86_64
        packer-centos-6.5-x86_64-disk1.vmdk

Environment

mitchellh commented 10 years ago

This is VirtualBox doing all of this, not Vagrant.

LevonBecker commented 10 years ago

Weird, then why if I downgrade Vagrant to 1.3.5 it doesn't do it?

mitchellh commented 10 years ago

That is odd... maybe our interaction with VirtualBox changed. Can you make a minimal Vagrantfile with steps to reproduce?

LevonBecker commented 10 years ago

Yep, even using the same min Vagrantfile works normal (one directory) then upgrade Vagrant and us same one (after destroying first test). Then uninstall Vagrant and install 1.3.5 ... And it works normal again. I tried on another computer as well.

LevonBecker commented 10 years ago

I just tried the same test on my personal Mac OS X Mavericks laptop and it does NOT have the same issues as I'm seeing on my Nike Windows 7 x64 laptop. On the Mac with 1.6.2 and Vbox 4.3.10 it only creates one folder as expected. Help me Obi-wan you're my only hope... :)