1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Revert "B #2716: Add support for IDE disks in vCenter"

This reverts commit 93309d0c5009df3a4c36de428a385dddda189303.

Causes problems with VM migration. Needs further investigation
This commit is contained in:
Tino Vazquez 2019-02-19 10:08:42 +01:00
parent b11ae81c15
commit fe170d0b54
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

View File

@ -1775,7 +1775,7 @@ class VirtualMachine < VCenterDriver::Template
pos = {:ide => 0, :scsi => 0}
disks_each(:no_exists?) do |disk|
k = disk.one_item['DEV_PREFIX'] == 'hd' ? :ide : :scsi
k = disk.one_item['TYPE'] == 'CDROM' ? :ide : :scsi
if disk.storpod?
spec = calculate_add_disk_spec(disk.one_item, pos[k])
@ -2085,17 +2085,16 @@ class VirtualMachine < VCenterDriver::Template
img_name = VCenterDriver::FileHelper.unescape_path(img_name_escaped)
type = disk["TYPE"]
size_kb = disk["SIZE"].to_i * 1024
ide_or_scsi = disk["DEV_PREFIX"] == "hd" ? :ide : :scsi
type = disk["TYPE"]
size_kb = disk["SIZE"].to_i * 1024
if type == "CDROM"
# CDROM ISO will be found in the IMAGE DS
# CDROM drive will be found in the IMAGE DS
ds_ref = disk["VCENTER_DS_REF"]
ds = VCenterDriver::Storage.new_from_ref(ds_ref, @vi_client)
ds_name = ds['name']
# CDROM ISO can only be added when the VM is in poweroff state
# CDROM can only be added when the VM is in poweroff state
vmdk_backing = RbVmomi::VIM::VirtualCdromIsoBackingInfo(
:datastore => ds.item,
:fileName => "[#{ds_name}] #{img_name}"
@ -2128,12 +2127,7 @@ class VirtualMachine < VCenterDriver::Template
else
# TYPE is regular disk (not CDROM)
if ide_or_scsi == :scsi
controller, unit_number = find_free_controller(position)
else
controller, unit_number = find_free_ide_controller(position)
end
controller, unit_number = find_free_controller(position)
storpod = disk["VCENTER_DS_REF"].start_with?('group-')
if storpod