mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(region): vmware migrate vnc
This commit is contained in:
@@ -161,6 +161,28 @@ func (self *SESXiGuestDriver) ChooseHostStorage(host *models.SHost, guest *model
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SESXiGuestDriver) GetGuestVncInfo(ctx context.Context, userCred mcclient.TokenCredential, guest *models.SGuest, host *models.SHost, input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error) {
|
||||
iRegion, err := host.GetIRegion(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ihost, err := iRegion.GetIHostById(host.ExternalId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
iVM, err := ihost.GetIVMById(guest.ExternalId)
|
||||
if err != nil {
|
||||
if errors.Cause(err) != cloudprovider.ErrNotFound {
|
||||
return nil, err
|
||||
}
|
||||
iVM, err = iRegion.GetIVMById(guest.ExternalId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return iVM.GetVNCInfo(input)
|
||||
}
|
||||
|
||||
func (self *SESXiGuestDriver) GetMinimalSysDiskSizeGb() int {
|
||||
return options.Options.DefaultDiskSizeMB / 1024
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user