mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 03:42:52 +09:00
F #4913: Disk size is obtained from DISK/SIZE attribute in calculate_add_disk
This commit is contained in:
1 parent
18494e421b
commit
dcffd52a95
1 file changed
+2
-3
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user