From 102089966dcd4897a19aa8dd656d9566f7c55c63 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 31 Mar 2012 18:12:26 +0200 Subject: [PATCH] bug: Replace any existing VMID variable in VM template (cherry picked from commit 00346f8dc2145bb1f4e01ae88f662f0624d8b1b8) --- src/vm/VirtualMachine.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index 87e6a19943..0dc42dda92 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -209,9 +209,7 @@ int VirtualMachine::insert(SqlDB * db, string& error_str) oss << oid; value = oss.str(); - attr = new SingleAttribute("VMID",value); - - obj_template->set(attr); + replace_template_attribute("VMID", value); get_template_attribute("NAME",name);