mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Bug #4009: Importing vms from EC2 provides a wrong CPU value
(cherry picked from commit 8023e2146e426b7ca373c74ac632c25988524aad)
This commit is contained in:
1 parent
6b897742ee
commit
fd1a050e08
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