diff --git a/pkg/util/azure/classic_instance.go b/pkg/util/azure/classic_instance.go index 7753e39299..af25b66a00 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 c9aaf332d7..354b8197d5 100644 --- a/pkg/util/azure/instance.go +++ b/pkg/util/azure/instance.go @@ -229,7 +229,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 {