diff --git a/pkg/util/azure/classic_instance.go b/pkg/util/azure/classic_instance.go index 388e9f3620..03f622e386 100644 --- a/pkg/util/azure/classic_instance.go +++ b/pkg/util/azure/classic_instance.go @@ -113,7 +113,8 @@ type SClassicInstance struct { func (self *SClassicInstance) GetMetadata() *jsonutils.JSONDict { data := jsonutils.NewDict() - data.Add(jsonutils.NewString(self.Properties.HardwareProfile.Size), "price_key") + priceKey := fmt.Sprintf("%s::%s", self.Properties.HardwareProfile.Size, self.host.zone.region.Name) + data.Add(jsonutils.NewString(priceKey), "price_key") if self.Properties.NetworkProfile.NetworkSecurityGroup != nil { data.Add(jsonutils.NewString(self.Properties.NetworkProfile.NetworkSecurityGroup.ID), "secgroupId") } diff --git a/pkg/util/azure/instance.go b/pkg/util/azure/instance.go index aff99f53ee..5da04a5f94 100644 --- a/pkg/util/azure/instance.go +++ b/pkg/util/azure/instance.go @@ -224,7 +224,8 @@ func (self *SInstance) GetMetadata() *jsonutils.JSONDict { data.Add(jsonutils.NewString(loginKey), "login_key") } - data.Add(jsonutils.NewString(self.Properties.HardwareProfile.VMSize), "price_key") + priceKey := fmt.Sprintf("%s::%s", self.Properties.HardwareProfile.VMSize, self.host.zone.region.Name) + data.Add(jsonutils.NewString(priceKey), "price_key") if nics, err := self.getNics(); err == nil { for _, nic := range nics { if nic.Properties.NetworkSecurityGroup != nil {