diff --git a/commands/create.go b/commands/create.go index 648159ae69..d527132d9f 100644 --- a/commands/create.go +++ b/commands/create.go @@ -451,7 +451,8 @@ func updateUserdataFile(driverOpts *rpcdriver.RPCFlags, machineName, hostname, u // on how hostnames are set in cloud-config (userdata) func writeCloudConfig(machineName, encodedData, machineOS, hostname string, cf map[interface{}]interface{}, newUserDataFile *os.File) error { command := "sh" - path := "/usr/local/custom_script/install.sh" + // allow the script to work on distros with read-only /usr partitions + path := "/var/run/install.sh" key := "hostname" if strings.Contains(machineOS, "windows") { // the writeFile path should ideally be C:\usr\local\custom_script\install.ps1