Skip to content

Commit 4fc7962

Browse files
authored
Fix cloud-init hostname configuration
The cloud-init `meta-data` file is in YAML format. The leading asterisk commented out the `local-hostname` option so that the hostname was never applied to the machine by cloud-init.
1 parent f675ca2 commit 4fc7962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vmwarevsphere/cloudinit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (d *Driver) createCloudInitIso() error {
154154
return err
155155
}
156156

157-
md := []byte(fmt.Sprintf("#local-hostname: %s\n", d.MachineName))
157+
md := []byte(fmt.Sprintf("local-hostname: %s\n", d.MachineName))
158158
if err = ioutil.WriteFile(metadata, md, perm); err != nil {
159159
return err
160160
}

0 commit comments

Comments
 (0)