 
       KD.getGroup().fetchProducts 'pack', options, (err, packs) ->
         return  if KD.showError err
-        
+
         productForm.setContents 'packs', packs
 
     workflow = new PaymentWorkflow

          color       : "#ffffff"
        duration      : 120000

      KD.remote.cacheable KD.defaultSlug, (err, group)->
        if err or not group?.length
          return warn err
        koding = group.first
        koding.createVM
          planCode : 'free'
          type     : 'user'
        , (err)->
          unless err
            vmController = KD.getSingleton('vmController')
            vmController.fetchDefaultVmName (defaultVmName)->
              vmController.emit 'VMListChanged'
              KD.getSingleton('finderController').mountVm defaultVmName
              notify.destroy()
              callback?()
          else
            notify?.destroy()
            KD.showError err

  createNewVM: (callback)->
    @hasDefaultVM (err, state)=>
      if state then @createPaidVM() else @createDefaultVM callback

  showVMDetails: (vm)->
    vmName = vm.hostnameAlias

    JVM.removeByHostname hostnameAlias, (err)->
      return callback err  if err

      # KD.getSingleton("finderController").unmountVm hostnameAlias
      KD.getSingleton("vmController").emit 'VMListChanged'
      callback null

