diff --git a/pkg/compute/models/guests.go b/pkg/compute/models/guests.go index c564a18b0a..479dae275a 100644 --- a/pkg/compute/models/guests.go +++ b/pkg/compute/models/guests.go @@ -4280,12 +4280,17 @@ func (self *SGuest) ToCreateInput(userCred mcclient.TokenCredential) *api.Server if genInput.ResourceType != "" { userInput.ResourceType = genInput.ResourceType } + if genInput.InstanceType != "" { + userInput.InstanceType = genInput.InstanceType + } if genInput.PreferRegion != "" { userInput.PreferRegion = genInput.PreferRegion } if genInput.PreferZone != "" { userInput.PreferZone = genInput.PreferZone } + // clean GenerateName + userInput.GenerateName = "" return userInput }