     [proxmox.model :refer (get-node)]
     [proxmox.validations :refer (validate-provider)]
     [me.raynes.fs :refer (delete-dir temp-dir)]
-    [supernal.sshj :refer (copy ssh-up?)]
+    [supernal.sshj :refer (copy ssh-up? execute)]
     [hypervisors.networking :refer (debian-interfaces gen-ip release-ip mark redhat-network-cfg redhat-ifcfg-eth0)]
     [celestial.persistency :as p])
   (:import clojure.lang.ExceptionInfo))

    )
  )

(defn wait-for-ssh [{:keys [ip_address]} {:keys [user]} timeout]
  (wait-for {:timeout timeout}
     #(try 
        (ssh-up? {:host ip_address :port 22 :user user})

              (prox-delete (str "/nodes/" node "/openvz/" (:vmid ct)))) 
            (finally 
              (when-let [id (extended :system-id)] 
                (release-ip (p/system-ip id) "proxmox")))))

  (start [this]
         (debug "starting" (:vmid ct))
         (safe
           (prox-post (str "/nodes/" node "/openvz/" (:vmid ct) "/status/start")))
         (let [ip (or (network :ip_address) (p/system-ip (extended :system-id)))] 
            (wait-for-ssh ip (:user extended) [5 :minute]))
          )

  (stop [this]
        (debug "stopping" (:vmid ct))
