     [kvm.validations :refer (provider-validation)]
     [clojure.core.strint :refer (<<)] 
     [kvm.clone :refer (clone-domain)]
-    [kvm.common :refer (connect)]
+    [kvm.common :refer (connect get-domain state)]
     [supernal.sshj :refer (ssh-up?)]
     [celestial.core :refer (Vm)] 
     [taoensso.timbre :as timbre]

   (-> machine
     (mappings {:os :image :hostname :name})
     (transform (machine-ts machine))
     (selections [[:name :user :image]])))

(defmethod vconstruct :kvm [{:keys [kvm machine system-id] :as spec}]
   (let [[domain] (translate spec) {:keys [node]} kvm]
     (provider-validation domain)
     (->Domain system-id (hypervisor* :kvm :nodes node) domain))
  )


      (let [{:keys [image target]} domain]
        (clone-domain connection image target)))) 

  (delete [this]
    (with-connection 
      (.destroy (get-domain connection (domain :name))))
    )

  (start [this]
    (with-connection 
      (.create (get-domain connection (domain :name)))))

  (stop [this]
    (with-connection 
      (.shutdown (get-domain connection (domain :name)))))

  (status [this]
    (with-connection 
      (state (get-domain connection (domain :name))) 
      ) 
    )

  (ip [this]))

