# File lib/vagrant-libvirt/provider.rb, line 97
      def state
        state_id = nil
        state_id = :not_created unless @machine.id
        state_id = :not_created if
          !state_id && (!@machine.id || !driver.created?(@machine.id))
        # Query the driver for the current state of the machine
        state_id = driver.state(@machine) if @machine.id && !state_id
        state_id = :unknown unless state_id

        # This is a special pseudo-state so that we don't set the
        # NOT_CREATED_ID while we're setting up the machine. This avoids
        # clearing the data dir.
        state_id = :preparing if @machine.id == 'preparing'

        # Get the short and long description
        short = state_id.to_s.tr('_', ' ')
        long  = I18n.t("vagrant_libvirt.states.#{state_id}")

        # If we're not created, then specify the special ID flag
        if state_id == :not_created
          state_id = Vagrant::MachineState::NOT_CREATED_ID
        end

        # Return the MachineState object
        Vagrant::MachineState.new(state_id, short, long)
      end