mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-10 06:24:35 +09:00
Bug #4009: Importing vms from EC2 provides a wrong CPU value
This commit is contained in:
1 parent
84ca46d2dc
commit
c80e6a275a
1 file changed
+4
-2
@@ -592,11 +592,13 @@ private
|
||||
def vm_to_one(instance)
|
||||
cpu, mem = instance_type_capacity(instance.instance_type)
|
||||
|
||||
mem = mem.to_i / 1024 # Memory for templates expressed in MB
|
||||
cpu = cpu.to_f / 100
|
||||
vcpu = cpu.ceil
|
||||
mem = mem.to_i / 1024 # Memory for templates expressed in MB
|
||||
|
||||
str = "NAME = \"Instance from #{instance.id}\"\n"\
|
||||
"CPU = \"#{cpu}\"\n"\
|
||||
"vCPU = \"#{cpu}\"\n"\
|
||||
"VCPU = \"#{vcpu}\"\n"\
|
||||
"MEMORY = \"#{mem}\"\n"\
|
||||
"HYPERVISOR = \"ec2\"\n"\
|
||||
"PUBLIC_CLOUD = [\n"\
|
||||
|
||||
Reference in new issue
Block a user