Merge pull request #5775 from ioito/automated-cherry-pick-of-#5774-upstream-release-3.1

Automated cherry pick of #5774: fix: azure重装系统删除不必要的参数
This commit is contained in:
yunion-ci-robot
2020-04-12 00:37:53 +08:00
committed by GitHub
+1
View File
@@ -839,6 +839,7 @@ func (region *SRegion) ReplaceSystemDisk(instance *SInstance, cpu int, memoryMb
instance.Properties.StorageProfile.OsDisk.Name = ""
instance.Properties.ProvisioningState = ""
instance.Properties.InstanceView = nil
instance.Properties.VmId = ""
err = region.client.Update(jsonutils.Marshal(instance), nil)
if err != nil {
// 更新失败,需要删除之前交换过的系统盘