Created
June 2, 2011 19:20
-
-
Save hugoduncan/1005093 to your computer and use it in GitHub Desktop.
vmfest manager with sata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn attach-hard-disk [m uuid] | |
{:pre [(model/Machine? m)]} | |
(session/with-vbox (:server m) [_ vbox] | |
(let [medium (vbox/find-medium vbox uuid)] | |
(session/with-session m :shared [_ vb-m] | |
(try | |
(attach-device vb-m "SATA Controller" 0 0 :hard-disk medium) | |
(catch clojure.contrib.condition.Condition _ | |
(attach-device vb-m "IDE Controller" 0 0 :hard-disk medium))) | |
(.saveSettings vb-m))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment