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

F #4913: Disk size is obtained from DISK/SIZE attribute in calculate_add_disk

This commit is contained in:
mcabrerizo 2017-04-05 09:47:55 +02:00
parent 18494e421b
commit dcffd52a95

View File

@ -1272,8 +1272,7 @@ class VirtualMachine
ds_name = ds['name']
type = disk["TYPE"]
# TODO: size_kb = 0 ??
size_kb = 0
size_kb = disk["SIZE"].to_i * 1024
controller, new_number = find_free_controller(position)
@ -1283,7 +1282,7 @@ class VirtualMachine
:fileName => "[#{ds_name}] #{img_name}"
)
cd = self['config.hardware.device'].select do |hw|
cd = @item['config.hardware.device'].select do |hw|
hw.class == RbVmomi::VIM::VirtualCdrom
end.first