總瀏覽量

2014年8月5日 星期二

disk stored in different folder when vagrant up on a windows host

Recently I ran into several vagrant issue on windows host.

List down my environment for your refference:
Vagrant: 1.6.3
Virtualbox: 4.3.15
OS: windows 7

One of the issue is that for different VM provisioned from same box, their disks are all stored in a folder with box name prefixed instead of folder name that Vagrantfile placed.

See this ticket which has a graph showing what's happening.

And the root cause is somehow related to windows backslash path.

For more detail, you can look deep into the fix.

Here comes the key point, how do we fix it?

Although vagrant hasn't release a new build yet,we can apply the fix by ourself.

Just replace the file under following path on your windows host with the fix:

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.3\plugins\providers\virtualbox\driver

Depends on which version of virtualbox you're using, for me I replace the file:

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.3\plugins\providers\virtualbox\driver\version_4_3.rb

After doing so, it all works well now.

沒有留言:

張貼留言