'Create a new instance/VM/domain on the virtualization platform.
Once this successfully completes, the instance should be
running (power_state.RUNNING).
If this fails, any partial instance should be completely
cleaned up, and the virtualization platform should be in the state
that it was before this call began.
:param context: security context
:param instance: nova.objects.instance.Instance
This function should use the data there to guide
the creation of the new instance.
:param nova.objects.ImageMeta image_meta:
The metadata of the image of the instance.
:param injected_files: User files to inject into instance.
:param admin_password: Administrator password to set in instance.
:param network_info: instance network information
:param block_device_info: Information about block devices to be
attached to the instance.'

def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None):

    self._log_operation('spawn', instance)
    flow_spawn = tf_lf.Flow('spawn')
    stg_ftsk = pvm_par.build_active_vio_feed_task(self.adapter, xag={pvm_const.XAG.VIO_SMAP, pvm_const.XAG.VIO_FMAP})
    flow_spawn.add(tf_vm.Create(self.adapter, self.host_wrapper, instance, stg_ftsk))
    flow_spawn.add(tf_stg.CreateDiskForImg(self.disk_dvr, context, instance, image_meta))
    flow_spawn.add(tf_stg.AttachDisk(self.disk_dvr, instance, stg_ftsk=stg_ftsk))
    flow_spawn.add(stg_ftsk)
    flow_spawn.add(tf_vm.PowerOn(self.adapter, instance))
    tf_base.run(flow_spawn, instance=instance)
