Skip to content

Commit d94a7cd

Browse files
authored
Merge pull request #38 from aws/fix/use-capi-machine-name-for-vm-creation
To match node names to machine names, use CAPI machine names when creating CloudStack VMs
2 parents 22abffb + 18bb799 commit d94a7cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cloud/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ func (c *client) GetOrCreateVMInstance(
156156
// Create VM instance.
157157
p := c.cs.VirtualMachine.NewDeployVirtualMachineParams(offeringID, templateID, csCluster.Status.ZoneID)
158158
p.SetNetworkids([]string{csCluster.Status.NetworkID})
159-
setIfNotEmpty(csMachine.Name, p.SetName)
160-
setIfNotEmpty(csMachine.Name, p.SetDisplayname)
159+
setIfNotEmpty(capiMachine.Name, p.SetName)
160+
setIfNotEmpty(capiMachine.Name, p.SetDisplayname)
161161
setIfNotEmpty(csMachine.Spec.SSHKey, p.SetKeypair)
162162

163163
compressedAndEncodedUserData, err := CompressAndEncodeString(userData)

0 commit comments

Comments
 (0)