         callback? err, vm, info
       , no
 
-  hasThisVM:(vmTemplate, vms)->
-    for i in [0..vms.length]  when ("#{vmTemplate}".replace '%d', i) in vms
-      return ("#{vmTemplate}".replace '%d', i)
-    return no
-
   fetchVmName: (options, callback) ->
     if options.vmName?
-    then @utils.defer -> callback null, options.vmName
-    # else if KD.whoami().type is 'unregistered'
-    # then @utils.defer -> callback null, 'guest'
+      @utils.defer -> callback null, options.vmName
     else
       @fetchDefaultVmName (defaultVmName) ->
         if defaultVmName?

      { title : item.title, value : i, feeMonthly }

    return {descriptions, hostTypes}

    currentGroup   = if entryPoint?.type is 'group' then entryPoint.slug
    currentGroup or= KD.defaultSlug

    @fetchVMs (err, vmNames)=>
      if err or not vmNames
        return callback null

      # If there is just one return it
      if vmNames.length is 1
        return callback @defaultVmName = vmNames.first

      # If current group is 'koding' ask to backend for the default one
      KD.remote.api.JVM.fetchDefaultVm (err, defaultVmName)=>
        if currentGroup is 'koding' and defaultVmName
          return callback @defaultVmName = defaultVmName

        vmSort   = (x,y)-> x.uid - y.uid
        vms      = (@parseAlias vm for vm in vmNames)
        userVMs  = (vm for vm in vms when vm?.type is 'user').sort vmSort
        groupVMs = (vm for vm in vms when vm?.type is 'group').sort vmSort

        # Check for personal VMs in current group
        for vm in userVMs when vm.groupSlug is currentGroup
          return callback @defaultVmName = vm.alias

        # Check for shared VMs in current group
        for vm in groupVMs when vm.groupSlug is currentGroup
          return callback @defaultVmName = vm.alias

        # Check for personal VMs in Koding or Guests group
        for vm in userVMs when vm.groupSlug in ['koding', 'guests']
          return callback @defaultVmName = vm.alias

        # Fallback to Koding VM if exists
        return callback @defaultVmName = defaultVmName

  createGroupVM:(type='user', planCode, callback=->)->
    vmCreateCallback = (err, vm)->
