'Create a new VM and start it.'

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

    LOG.info('Spawning    new    instance', instance=instance)
    instance_name = instance.name
    if self._vmutils.vm_exists(instance_name):
        raise exception.InstanceExists(name=instance_name)
    self._delete_disk_files(instance_name)
    vm_gen = self.get_image_vm_generation(instance.uuid, image_meta)
    self._block_dev_man.validate_and_update_bdi(instance, image_meta, vm_gen, block_device_info)
    root_device = block_device_info['root_disk']
    self._create_root_device(context, instance, root_device, vm_gen)
    self._create_ephemerals(instance, block_device_info['ephemerals'])
    try:
        with self.wait_vif_plug_events(instance, network_info):
            self.create_instance(instance, network_info, root_device, block_device_info, vm_gen, image_meta)
        self._save_device_metadata(context, instance, block_device_info)
        if configdrive.required_by(instance):
            configdrive_path = self._create_config_drive(context, instance, injected_files, admin_password, network_info)
            self.attach_config_drive(instance, configdrive_path, vm_gen)
        self.set_boot_order(instance.name, vm_gen, block_device_info)
        self.power_on(instance, network_info=network_info)
    except Exception:
        with excutils.save_and_reraise_exception():
            self.destroy(instance)
