mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
bugfix
This commit is contained in:
@@ -106,7 +106,7 @@ func (self *SInstance) GetId() string {
|
||||
}
|
||||
|
||||
func (self *SInstance) GetName() string {
|
||||
return self.HostName
|
||||
return self.InstanceName
|
||||
}
|
||||
|
||||
func (self *SInstance) GetGlobalId() string {
|
||||
@@ -147,7 +147,7 @@ func (self *SInstance) GetMetadata() *jsonutils.JSONDict {
|
||||
|
||||
if len(self.ImageId) > 0 {
|
||||
if image, err := self.host.zone.region.GetImage(self.ImageId); err != nil {
|
||||
log.Errorf("Failed to find image %s for instance %s", self.ImageId, self.GetName())
|
||||
log.Errorf("Failed to find image %s for instance %s zone %s", self.ImageId, self.GetId(), self.ZoneId)
|
||||
} else if meta := image.GetMetadata(); meta != nil {
|
||||
data.Update(meta)
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ func (self *SHost) _createVM(name string, imgId string, sysDiskSize int, cpu int
|
||||
DataDisks = append(DataDisks, compute.DataDisk{
|
||||
Name: &diskName,
|
||||
DiskSizeGB: &size,
|
||||
CreateOption: compute.Empty,
|
||||
CreateOption: compute.DiskCreateOptionTypesEmpty,
|
||||
Lun: &lun,
|
||||
})
|
||||
}
|
||||
@@ -125,12 +125,12 @@ func (self *SHost) _createVM(name string, imgId string, sysDiskSize int, cpu int
|
||||
StorageProfile: &compute.StorageProfile{
|
||||
ImageReference: &compute.ImageReference{ID: &image.ID},
|
||||
OsDisk: &compute.OSDisk{
|
||||
Caching: compute.ReadWrite,
|
||||
Caching: compute.CachingTypesReadWrite,
|
||||
ManagedDisk: &compute.ManagedDiskParameters{
|
||||
StorageAccountType: compute.StorageAccountTypes(storage.storageType),
|
||||
},
|
||||
Name: &osDiskName,
|
||||
CreateOption: compute.FromImage,
|
||||
CreateOption: compute.DiskCreateOptionTypesEmpty,
|
||||
OsType: osType,
|
||||
DiskSizeGB: &DiskSizeGB,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user