def spawn(self, context, instance, network_info):
        vdis = None
        try:
            vdis = self._create_disks(context, instance)
            vm_ref = self._create_vm(context, instance, vdis, network_info)
            self._spawn(instance, vm_ref)
        except (self.XenAPI.Failure, __HOLE__, IOError) as spawn_error:
            LOG.exception(_("instance %s: Failed to spawn"),
                          instance.id, exc_info=sys.exc_info())
            LOG.debug(_('Instance %s failed to spawn - performing clean-up'),
                      instance.id)
            self._handle_spawn_error(vdis, spawn_error)
            raise spawn_error
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/virt/xenapi/vmops.py/VMOps.spawn