 
 
   fetchGroupVMs:(callback = noop)->
-    # if KD.isGuest() then @groupVms = ['guest']
     if @groupVms.length > 0
       return @utils.defer =>
         callback null, @groupVms

      callback? err, vms

  fetchVMDomains:(vmName, callback = noop)->
    # if KD.isGuest() then @vmDomains = guest: ['guest.kd.io']
    if domains = @vmDomains[vmName]
      return @utils.defer -> callback null, domains


  fetchVMs: do (waiting = []) ->
    (force, callback)->
      [callback, force] = [force, callback]  unless callback?
      return  unless callback?

      if @vms.length
        return @utils.defer => callback null, @vms

      if not force and (waiting.push callback) > 1
        return  callback null, []

      KD.remote.api.JVM.fetchVms (err, vms)=>
        @vms = vms  unless err
