mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
1. Fix the bug when preparing remote image by copy 2. SHost.FileUrlPathToDsPath will not work when shost has multiple storage.
This commit is contained in:
@@ -680,7 +680,7 @@ func (self *SHost) DoCreateVM(ctx context.Context, ds *SDatastore, data *jsonuti
|
||||
if len(cdromPath) != 0 && !strings.HasPrefix(cdromPath, "[") {
|
||||
cdromPath, err = self.FileUrlPathToDsPath(cdromPath)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "SHost.FileUrlPathToDsPath", cdromPath)
|
||||
return nil, errors.Wrapf(err, "SHost.FileUrlPathToDsPath")
|
||||
}
|
||||
}
|
||||
deviceChange = append(deviceChange, addDevSpec(NewCDROMDev(cdromPath, 16000, 201)))
|
||||
@@ -702,7 +702,7 @@ func (self *SHost) DoCreateVM(ctx context.Context, ds *SDatastore, data *jsonuti
|
||||
} else {
|
||||
imagePath, err = self.FileUrlPathToDsPath(imagePath)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "SHost.FileUrlPathToDsPath", imagePath)
|
||||
return nil, errors.Wrapf(err, "SHost.FileUrlPathToDsPath")
|
||||
}
|
||||
}
|
||||
uuid, _ := disk.GetString("disk_id")
|
||||
|
||||
Reference in New Issue
Block a user