Generate properly cloudinit metadata file
@@ -206,7 +206,7 @@ func GenerateLocalData(vmName string, namespace string, source *v1.CloudInitNoCl
} else {
return errors.New(fmt.Sprintf("userDataBase64 or userData is required for no-cloud data source"))
}
- metaData := []byte(fmt.Sprintf("{ \"instance-id\": \"%s.%s\" }\n", vmName, namespace))
+ metaData := []byte(fmt.Sprintf("{ \"instance-id\": \"%s.%s\", \"local-hostname\": \"%s\" }\n", vmName, namespace, vmName))
diskutils.RemoveFile(userFile)
diskutils.RemoveFile(metaFile)
