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.