Skip to content

Commit 18bb799

Browse files
committed
To match node names to machine names, use CAPI machine names when creating CloudStack VMs
1 parent 22abffb commit 18bb799

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)