diff --git a/opennebula_api/models.py b/opennebula_api/models.py
index 1745fb49..0c4e521b 100644
--- a/opennebula_api/models.py
+++ b/opennebula_api/models.py
@@ -154,10 +154,7 @@ class OpenNebulaManager():
{memory}
{vcpu}
{cpu}
-
- {ssh}
-
- """
+ """
try:
disk = template.template.disks[0]
image_id = disk.image_id
@@ -165,7 +162,6 @@ class OpenNebulaManager():
vcpu=int(specs['cpu']),
cpu=0.1* int(specs['cpu']),
memory=1024 * int(specs['memory']),
- ssh=ssh_key
)
vm_specs += """
@@ -187,7 +183,6 @@ class OpenNebulaManager():
vcpu=int(specs['cpu']),
cpu=0.1* int(specs['cpu']),
memory=1024 * int(specs['memory']),
- ssh=ssh_key
)
vm_specs += """
@@ -205,6 +200,14 @@ class OpenNebulaManager():
pending=False,
extra_template=vm_specs, )
+ self.oneadmin_client.call(
+ 'vm.updateconf',
+ vm_id,
+ """
+ {ssh}
+
+ """.format(ssh=ssh_key)
+ )
try:
self.oneadmin_client.call(
oca.VirtualMachine.METHODS['chown'],