mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
aws rebuild root fix
This commit is contained in:
@@ -960,12 +960,17 @@ func (self *SRegion) ReplaceSystemDisk(ctx context.Context, instanceId string, i
|
||||
}
|
||||
log.Debugf("ReplaceSystemDisk replace root disk %s", rootDisk.DiskId)
|
||||
|
||||
subnetId := ""
|
||||
if len(instance.VpcAttributes.NetworkId) > 0 {
|
||||
subnetId = instance.VpcAttributes.NetworkId
|
||||
}
|
||||
|
||||
// create tmp server
|
||||
tempName := fmt.Sprintf("__tmp_%s", instance.GetName())
|
||||
_id, err := self.CreateInstance(tempName,
|
||||
imageId,
|
||||
instance.InstanceType,
|
||||
"",
|
||||
subnetId,
|
||||
"",
|
||||
instance.ZoneId,
|
||||
instance.Description,
|
||||
|
||||
Reference in New Issue
Block a user