diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 9f283c5..315ce59 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -380,20 +380,22 @@
                   (img_path, img_container_format, img_disk_format,
                    img_properties, ami_img_path, ari_img_path, aki_img_path))
         try:
-            self.image = self._image_create('scenario-img',
-                                            img_container_format,
-                                            img_path,
-                                            disk_format=img_disk_format,
-                                            properties=img_properties)
+            image = self._image_create('scenario-img',
+                                       img_container_format,
+                                       img_path,
+                                       disk_format=img_disk_format,
+                                       properties=img_properties)
         except IOError:
             LOG.debug("A qcow2 image was not found. Try to get a uec image.")
             kernel = self._image_create('scenario-aki', 'aki', aki_img_path)
             ramdisk = self._image_create('scenario-ari', 'ari', ari_img_path)
             properties = {'kernel_id': kernel, 'ramdisk_id': ramdisk}
-            self.image = self._image_create('scenario-ami', 'ami',
-                                            path=ami_img_path,
-                                            properties=properties)
-        LOG.debug("image:%s" % self.image)
+            image = self._image_create('scenario-ami', 'ami',
+                                       path=ami_img_path,
+                                       properties=properties)
+        LOG.debug("image:%s" % image)
+
+        return image
 
     def _log_console_output(self, servers=None):
         if not CONF.compute_feature_enabled.console_output:
@@ -1369,16 +1371,6 @@
         else:
             cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
 
-    def _wait_for_volume_status(self, status):
-        self.status_timeout(
-            self.volume_client.volumes, self.volume.id, status)
-
-    def nova_boot(self):
-        self.keypair = self.create_keypair()
-        create_kwargs = {'key_name': self.keypair['name']}
-        self.server = self.create_server(image=self.image,
-                                         create_kwargs=create_kwargs)
-
     def create_volume_type(self, client=None, name=None):
         if not client:
             client = self.admin_volume_types_client
diff --git a/tempest/scenario/test_encrypted_cinder_volumes.py b/tempest/scenario/test_encrypted_cinder_volumes.py
index 99837eb..082a8bf 100644
--- a/tempest/scenario/test_encrypted_cinder_volumes.py
+++ b/tempest/scenario/test_encrypted_cinder_volumes.py
@@ -42,8 +42,11 @@
             raise cls.skipException('Encrypted volume attach is not supported')
 
     def launch_instance(self):
-        self.glance_image_create()
-        self.nova_boot()
+        image = self.glance_image_create()
+        keypair = self.create_keypair()
+
+        return self.create_server(image=image,
+                                  create_kwargs={'key_name': keypair['name']})
 
     def create_encrypted_volume(self, encryption_provider, volume_type):
         volume_type = self.create_volume_type(name=volume_type)
@@ -52,26 +55,26 @@
                                     key_size=512,
                                     cipher='aes-xts-plain64',
                                     control_location='front-end')
-        self.volume = self.create_volume(volume_type=volume_type['name'])
+        return self.create_volume(volume_type=volume_type['name'])
 
-    def attach_detach_volume(self):
-        self.volume = self.nova_volume_attach(self.server, self.volume)
-        self.nova_volume_detach(self.server, self.volume)
+    def attach_detach_volume(self, server, volume):
+        attached_volume = self.nova_volume_attach(server, volume)
+        self.nova_volume_detach(server, attached_volume)
 
     @test.idempotent_id('79165fb4-5534-4b9d-8429-97ccffb8f86e')
     @test.services('compute', 'volume', 'image')
     def test_encrypted_cinder_volumes_luks(self):
-        self.launch_instance()
-        self.create_encrypted_volume('nova.volume.encryptors.'
-                                     'luks.LuksEncryptor',
-                                     volume_type='luks')
-        self.attach_detach_volume()
+        server = self.launch_instance()
+        volume = self.create_encrypted_volume('nova.volume.encryptors.'
+                                              'luks.LuksEncryptor',
+                                              volume_type='luks')
+        self.attach_detach_volume(server, volume)
 
     @test.idempotent_id('cbc752ed-b716-4717-910f-956cce965722')
     @test.services('compute', 'volume', 'image')
     def test_encrypted_cinder_volumes_cryptsetup(self):
-        self.launch_instance()
-        self.create_encrypted_volume('nova.volume.encryptors.'
-                                     'cryptsetup.CryptsetupEncryptor',
-                                     volume_type='cryptsetup')
-        self.attach_detach_volume()
+        server = self.launch_instance()
+        volume = self.create_encrypted_volume('nova.volume.encryptors.'
+                                              'cryptsetup.CryptsetupEncryptor',
+                                              volume_type='cryptsetup')
+        self.attach_detach_volume(server, volume)
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index 6497f7a..f45fb3a 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -79,7 +79,7 @@
             waiters.wait_for_server_status(self.servers_client,
                                            server['id'], status)
 
-    def nova_boot(self):
+    def nova_boot(self, image):
         name = data_utils.rand_name('scenario-server')
         flavor_id = CONF.compute.flavor_ref
         # Explicitly create secgroup to avoid cleanup at the end of testcases.
@@ -99,7 +99,7 @@
                                                          create_kwargs)
         self.servers_client.create_server(
             name=name,
-            imageRef=self.image,
+            imageRef=image,
             flavorRef=flavor_id,
             **create_kwargs)
         # needed because of bug 1199788
@@ -118,8 +118,8 @@
         self._wait_for_server_status('ACTIVE')
 
     def _large_ops_scenario(self):
-        self.glance_image_create()
-        self.nova_boot()
+        image = self.glance_image_create()
+        self.nova_boot(image)
 
     @test.idempotent_id('14ba0e78-2ed9-4d17-9659-a48f4756ecb3')
     @test.services('compute', 'image')
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index c3f3c78..13816e7 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -46,11 +46,6 @@
         waiters.wait_for_server_status(self.servers_client,
                                        server_id, status)
 
-    def nova_boot(self, keypair):
-        create_kwargs = {'key_name': keypair['name']}
-        return self.create_server(image=self.image,
-                                  create_kwargs=create_kwargs)
-
     def nova_list(self):
         servers = self.servers_client.list_servers()
         # The list servers in the compute client is inconsistent...
@@ -107,11 +102,12 @@
     @test.idempotent_id('bdbb5441-9204-419d-a225-b4fdbfb1a1a8')
     @test.services('compute', 'volume', 'image', 'network')
     def test_minimum_basic_scenario(self):
-        self.glance_image_create()
-
+        image = self.glance_image_create()
         keypair = self.create_keypair()
 
-        server = self.nova_boot(keypair)
+        create_kwargs = {'key_name': keypair['name']}
+        server = self.create_server(image=image,
+                                    create_kwargs=create_kwargs)
         servers = self.nova_list()
         self.assertIn(server['id'], [x['id'] for x in servers])
 
