diff --git a/xos/tosca/resources/compute.py b/xos/tosca/resources/compute.py
index 719c4f5..3040721 100644
--- a/xos/tosca/resources/compute.py
+++ b/xos/tosca/resources/compute.py
@@ -35,9 +35,12 @@
 
         return XOSImageSelector(user, distribution=distribution, version=version, type=type, architecture=architecture).get_image()
 
-    def get_xos_args(self):
+    def get_xos_args(self, name=None):
         nodetemplate = self.nodetemplate
 
+        if not name:
+            name = nodetemplate.name
+
         host=None
         flavor=None
         image=None
@@ -59,15 +62,15 @@
         if not flavor:
             raise Exception("Failed to pick a flavor")
 
-        return {"name": nodetemplate.name,
+        return {"name": name,
                 "image": image,
                 "slice": slice,
                 "flavor": flavor,
                 "node": compute_node,
                 "deployment": compute_node.site_deployment.deployment}
 
-    def create(self):
-        xos_args = self.get_xos_args()
+    def create(self, name = None):
+        xos_args = self.get_xos_args(name=name)
         sliver = Sliver(**xos_args)
         sliver.caller = self.user
         sliver.save()
@@ -75,3 +78,30 @@
         self.info("Created Sliver '%s' on node '%s' using flavor '%s' and image '%s'" %
                   (str(sliver), str(sliver.node), str(sliver.flavor), str(sliver.image)))
 
+    def create_or_update(self):
+        scalable = self.get_scalable()
+        if scalable:
+            default_instances = scalable.get("default_instances",1)
+            for i in range(0, default_instances):
+                name = "%s-%d" % (self.nodetemplate.name, i)
+                existing_slivers = Sliver.objects.filter(name=name)
+                if existing_slivers:
+                    self.info("%s %s already exists" % (self.xos_model.__name__, name))
+                    self.update(existing_slivers[0])
+                else:
+                    self.create(name)
+        else:
+            super(XOSCompute,self).create_or_update()
+
+    def get_existing_objs(self):
+        scalable = self.get_scalable()
+        if scalable:
+            existing_slivers = []
+            max_instances = scalable.get("max_instances",1)
+            for i in range(0, max_instances):
+                name = "%s-%d" % (self.nodetemplate.name, i)
+                existing_slivers = existing_slivers + list(Sliver.objects.filter(name=name))
+            return existing_slivers
+        else:
+            return super(XOSCompute,self).get_existing_objs()
+
diff --git a/xos/tosca/resources/xosresource.py b/xos/tosca/resources/xosresource.py
index 1696ccb..fe0a5e5 100644
--- a/xos/tosca/resources/xosresource.py
+++ b/xos/tosca/resources/xosresource.py
@@ -1,3 +1,5 @@
+import pdb
+
 class XOSResource(object):
     xos_base_class = "XOSResource"
     xos_model = None
@@ -37,6 +39,14 @@
             return None
         return reqs[0]
 
+    def get_scalable(self):
+        if ("capabilities" in self.nodetemplate.entity_tpl) and \
+           ("host" in self.nodetemplate.entity_tpl["capabilities"]) and \
+           ("scalable" in self.nodetemplate.entity_tpl["capabilities"]["host"]):
+               return self.nodetemplate.entity_tpl["capabilities"]["host"]["scalable"]
+        else:
+            return {}
+
     def get_xos_object(self, cls, **kwargs):
         objs = cls.objects.filter(**kwargs)
         if not objs:
