diff --git a/xos/synchronizer/model_policies/model_policy_vhsstenant.py b/xos/synchronizer/model_policies/model_policy_vhsstenant.py
new file mode 100644
index 0000000..5520f58
--- /dev/null
+++ b/xos/synchronizer/model_policies/model_policy_vhsstenant.py
@@ -0,0 +1,148 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from synchronizers.new_base.modelaccessor import *
+from synchronizers.new_base.model_policies.model_policy_tenantwithcontainer import TenantWithContainerPolicy, LeastLoadedNodeScheduler
+from synchronizers.new_base.exceptions import *
+
+class VHSSTenantPolicy(TenantWithContainerPolicy):
+    model_name = "VHSSTenant"
+
+    # Already defined in Super class
+    #def handle_create(self, service_instance):
+    #    return self.handle_update(service_instance)
+
+    def handle_update(self, service_instance):
+        if (service_instance. link_deleted_count >0) and (not service_instance.provided_links.exists()):
+            self.logger.info("The last provided link has been deleted -- self-destructing.")
+            self.handle_delete(service_instance)
+            if VHSSTenant.objects.filter(id=service_instance.id).exists():
+                service_instance.delete()
+            else:
+                self.logger.info("Tenant %s is already deleted" % service_instance)
+            return
+
+        self.manage_container(service_instance)
+
+    def handle_delete(self, service_instance):
+        if service_instance.instance and (not service_instance.instance.deleted):
+            all_service_instances_this_instance = VHSSTenant.objects.filter(instance_id=service_instance.instance.id)
+            other_service_instances_this_instance = [x for x in all_service_instances_this_instance if x.id != service_instance.id]
+            if (not other_service_instances_this_instance):
+                self.logger.info("VHSSTenant Instance %s is now unused -- deleting" % service_instance.instance)
+                self.delete_instance(service_instance, service_instance.instance)
+            else:
+                self.logger.info("VHSSTenant Instance %s has %d other service instances attached" %
+                (service_instance.instance, len(other_service_instances_this_instance)))
+
+    def get_service(self, service_instance):
+        service_name = service_instance.owner.leaf_model_name
+        service_class = globals()[service_name]
+        return service_class.objects.get(id=service_instance.owner.id)
+
+    def find_instance_for_instance_tag(self, instance_tag):
+        tags = Tag.objects.filter(name="instance_tag", value=instance_tag)
+        if tags:
+            return tags[0].content_object
+        return None
+
+    def find_or_make_instance_for_instance_tag(self, service_instance):
+        instance_tag = self.get_instance_tag(service_instance)
+        instance = self.find_instance_for_instance_tag(instance_tag)
+        if instance:
+            if instance.no_sync:
+                # if no_sync is still set, then perhaps we failed while saving it and need to retry.
+                self.save_instance(service_instance, instance)
+            return instance
+
+        desired_image = self.get_image(service_instance)
+        desired_flavor = self.get_flavor(service_instance)
+
+        slice = service_instance.owner.slices.first()
+
+        (node, parent) = LeastLoadedNodeScheduler(slice, label=None).pick()
+
+        assert (slice is not None)
+        assert (node is not None)
+        assert (desired_image is not None)
+        assert (service_instance.creator is not None)
+        assert (node.site_deployment.deployment is not None)
+        assert (desired_image is not None)
+
+        instance = Instance(slice=slice,
+                            node=node,
+                            image=desired_image,
+                            creator=service_instance.creator,
+                            deployment=node.site_deployment.deployment,
+                            flavor=desired_flavor,
+                            isolation=slice.default_isolation,
+                            parent=parent)
+
+        self.save_instance(service_instance, instance)
+
+        return instance
+
+    def manage_container(self, service_instance):
+        if service_instance.deleted:
+            return
+
+        if service_instance.instance:
+            # We're good.
+            return
+
+        instance = self.find_or_make_instance_for_instance_tag(service_instance)
+        service_instance.instance = instance
+        # TODO: possible for partial failure here?
+        service_instance.save()
+
+    def delete_instance(self, service_instance, instance):
+        # delete the `instance_tag` tags
+        tags = Tag.objects.filter(service_id=service_instance.owner.id, content_type=instance.self_content_type_id,
+                                  object_id=instance.id, name="instance_tag")
+        for tag in tags:
+            tag.delete()
+
+        instance.delete()
+
+    def save_instance(self, service_instance, instance):
+        instance.no_sync = True  # prevent instance from being synced until we're done with it
+        super(VHSSTenantPolicy, self).save_instance(instance)
+
+        try:
+            if instance.isolation in ["container", "container_vm"]:
+                raise Exception("Not supported")
+
+            instance_tag = self.get_instance_tag(service_instance)
+            if instance_tag:
+                tags = Tag.objects.filter(name="instance_tag", value=instance_tag)
+                if not tags:
+                    tag = Tag(service=service_instance.owner, content_type=instance.self_content_type_id,
+                              object_id=instance.id, name="instance_tag", value=str(instance_tag))
+                    tag.save()
+
+            instance.no_sync = False  # allow the synchronizer to run now
+            super(VHSSTenantPolicy, self).save_instance(instance)
+        except:
+            # need to clean up any failures here
+            raise
+
+    def get_instance_tag(self, service_instance):
+        return '%d' % service_instance.id
+
+    def get_image(self, service_instance):
+        return service_instance.vhss_vendor.image
+
+    def get_flavor(self, service_vendor):
+        return service_vendor.vhss_vendor.flavor
diff --git a/xos/synchronizer/run-from-api.sh b/xos/synchronizer/run-from-api.sh
index de2c7fa..ed1147f 100755
--- a/xos/synchronizer/run-from-api.sh
+++ b/xos/synchronizer/run-from-api.sh
@@ -12,5 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-export XOS_DIR=/opt/xos
-python vhss-synchronizer.py  -C $XOS_DIR/synchronizers/vhss/vhss_from_api_config
+
+python vhss-synchronizer.py
\ No newline at end of file
diff --git a/xos/synchronizer/steps/sync_vhsstenant.py b/xos/synchronizer/steps/sync_vhsstenant.py
index d6bdd49..01433de 100644
--- a/xos/synchronizer/steps/sync_vhsstenant.py
+++ b/xos/synchronizer/steps/sync_vhsstenant.py
@@ -15,13 +15,14 @@
 import os
 import sys
 from django.db.models import Q, F
-from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
 from synchronizers.new_base.modelaccessor import *
+from synchronizers.new_base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
 
 parentdir = os.path.join(os.path.dirname(__file__), "..")
 sys.path.insert(0, parentdir)
 
 class SyncVHSSTenant(SyncInstanceUsingAnsible):
+
     provides = [VHSSTenant]
 
     observes = VHSSTenant
@@ -32,18 +33,7 @@
 
     service_key_name = "/opt/xos/configurations/mcord/mcord_private_key"
 
-    #Gets the attributes that are used by the Ansible template but are not
-    #part of the set of default attributes.
-
     def __init__(self, *args, **kwargs):
         super(SyncVHSSTenant, self).__init__(*args, **kwargs)
 
-    def fetch_pending(self, deleted):
-        if (not deleted):
-            objs = VHSSTenant.get_tenant_objects().filter(
-                Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
-        else:
-            objs = VHSSTenant.get_deleted_tenant_objects()
-
-        return objs
 
diff --git a/xos/synchronizer/steps/vhsstenant_playbook.yaml b/xos/synchronizer/steps/vhsstenant_playbook.yaml
index 83c8bbd..e0a34b2 100644
--- a/xos/synchronizer/steps/vhsstenant_playbook.yaml
+++ b/xos/synchronizer/steps/vhsstenant_playbook.yaml
@@ -15,7 +15,7 @@
 ---
 # vhsstenant_playbook
 
-- hosts: "{{ instance_name }}"
+- hosts: {{ instance_name }}
   gather_facts: False
   connection: ssh
   user: ubuntu
diff --git a/xos/synchronizer/vhss-synchronizer.py b/xos/synchronizer/vhss-synchronizer.py
index bae8953..2d1bb00 100755
--- a/xos/synchronizer/vhss-synchronizer.py
+++ b/xos/synchronizer/vhss-synchronizer.py
@@ -14,15 +14,18 @@
 
 #!/usr/bin/env python
 
-# Runs the standard XOS synchronizer
+# This imports and runs ../../xos-observer.py
 
 import importlib
 import os
 import sys
 
-synchronizer_path = os.path.join(os.path.dirname(
-    os.path.realpath(__file__)), "../../synchronizers/new_base")
-sys.path.append(synchronizer_path)
+from xosconfig import Config
+config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/vhss_config.yaml')
+
+Config.init(config_file, 'synchronizer-config-schema.yaml')
+observer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../synchronizers/new_base")
+
+sys.path.append(observer_path)
 mod = importlib.import_module("xos-synchronizer")
 mod.main()
-
diff --git a/xos/synchronizer/vhss_config.yaml b/xos/synchronizer/vhss_config.yaml
new file mode 100644
index 0000000..0123b0d
--- /dev/null
+++ b/xos/synchronizer/vhss_config.yaml
@@ -0,0 +1,23 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+name: vhss-synchronizer
+accessor:
+  username: xosadmin@opencord.org
+  password: "@/opt/xos/services/vhss/credentials/xosadmin@opencord.org"
+dependency_graph: "/opt/xos/synchronizers/vhss/model-deps"
+steps_dir: "/opt/xos/synchronizers/vhss/steps"
+sys_dir: "/opt/xos/synchronizers/vhss/sys"
+model_policies_dir: "/opt/xos/synchronizers/vhss/model_policies"
