core: fix serialization issue with vmTemplate

also sanitize the method names

Change-Id: I7689acb65594994a553e79c2c18558f98824f285
Signed-off-by: Roy Golan <rgolan@redhat.com>