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

Capstan fails to connect to started VM when sock path is too long on VirtualBox #71

Open
wkozaczuk opened this issue Nov 4, 2017 · 0 comments

Comments

@wkozaczuk
Copy link

wkozaczuk commented Nov 4, 2017

When instance name is pretty long resulting file path length of the sock file is longer than 104 limit (golang/go#6895) and results in the error like this:

capstan run -c 4 -v -p vbox -f "10000:10000" remote_loader_without_console2
Removing orphaned instance folder:
....
Empty command line will be set for this image
Created instance: remote_loader_without_console2

dial unix <long_path.sock>: connect: invalid argument

This method in hypervisor/vbox/vbox.go and hypervisor/vmv/vmw.go:

func (c *VMConfig) sockPath() string {
	if runtime.GOOS == "windows" {
		return "\\\\.\\pipe\\" + c.Name
	} else {
		return filepath.Join(c.Dir, c.Name, fmt.Sprintf("%s.sock", c.Name))
	}
}

needs to be changed to return path that is shorter than 104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant