mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(esxi): Fix GetDriver and add driver log for vdisk.
In GetDriver, return 'name' directly if driverMap is empty.
This commit is contained in:
@@ -756,7 +756,8 @@ func (self *SHost) DoCreateVM(ctx context.Context, ds *SDatastore, data *jsonuti
|
||||
index = ideIdx % 2
|
||||
ideIdx += 1
|
||||
}
|
||||
log.Debugf("size: %d, image path: %s, uuid: %s, index: %d, ctrlKey: %d", size, imagePath, uuid, index, ctrlKey)
|
||||
log.Debugf("size: %d, image path: %s, uuid: %s, index: %d, ctrlKey: %d, driver: %s.", size, imagePath, uuid,
|
||||
index, ctrlKey, disk.Driver)
|
||||
spec := addDevSpec(NewDiskDev(size, imagePath, uuid, int32(index), 2000, int32(ctrlKey)))
|
||||
spec.FileOperation = "create"
|
||||
deviceChange = append(deviceChange, spec)
|
||||
|
||||
@@ -268,7 +268,10 @@ func (disk *SVirtualDisk) GetDriver() string {
|
||||
"lsilogic": "scsi",
|
||||
"lsilogicsas": "scsi",
|
||||
}
|
||||
return mapping[name]
|
||||
if driver, ok := mapping[name]; ok {
|
||||
return driver
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
func (disk *SVirtualDisk) GetCacheMode() string {
|
||||
|
||||
Reference in New Issue
Block a user