Open JLofgren opened 6 years ago
I had this clone error while trying to manually convert vdi box to vmdk box, but I was supplying --variant ESX parameter... Which in the command display above passed from vagrant assuming there is nothing else occuring behind the scene is not the case...
In my case and base on what is discussed here :
I remove the --variant switch from the command and it clone successefully afterward...
Maybe not related, but it migth help finding the issue...
Here I think it was mention : https://www.virtualbox.org/ticket/9673
Sorry
@BuhtigithuB Thanks, but pretty sure that is unrelated. The error I got is clearly a path issue: C:\WINDOWS\system32\C:\VMs\ubuntu-xenial-16.04-cloudimg-20180413
is clearly not a valid path. It looks to me like the plugin is making some assumptions about the environment that it is working in, and those assumptions don't align with the WSL.
@JLofgren I've managed to make it work. It is a dirty fix and doesn't clean up the old disk. https://github.com/sprotheroe/vagrant-disksize/compare/master...lotherk:fix_wsl_dst_file I currently don't have time to improve it but may be a starting point for someone else to write an actual fix.
Hi! Bumped into this issue as well. Made this fix that worked for me locally https://github.com/sprotheroe/vagrant-disksize/pull/27
Any chance we can get a new release cut with this included?
I'm not good with Ruby, even less with pull-requests, but here's my alternative solution:
# actions.rb
def generate_resizable_disk(disk)
src = "" + disk[:file]
src_extn = File.extname(src)
dst = src.delete_suffix!(src_extn) + '.vdi'
disk.merge({ uuid: "(undefined)", file: dst })
end
Summary
Plugin fails with a path error when used in WSL.
Environment
Vagrant 2.0.1 VirtualBox 5.2.8 Windows 10 WSL with Ubuntu 16.04
Steps to reproduce
-Install Windows WSL with Ubuntu 16.04. Install vagrant therein. Setup is described here. -
vagrant init ubuntu/xenial
-use the disksize plugin in the VagrantFile-
vagrant up
Expected Behavior
Will successfully set the size of the disk.
Actual Behavior