Skip to content

Instantly share code, notes, and snippets.

@ianrumford
Created October 12, 2012 13:31
Show Gist options
  • Save ianrumford/3879212 to your computer and use it in GitHub Desktop.
Save ianrumford/3879212 to your computer and use it in GitHub Desktop.
VMFest VBox 4.2 examples blog_vmfest_model0.clj
(ns vmfest_examples.blog_vmfest_model0
(:require [vmfest.manager :as vman]))
;; Models must be kept in ~/.vmfest/models
;; First connect to the VBox web service.
(def my-server (vman/server "http://localhost:18083" "ian" "<password goes here>"))
;; Name of the machine
(def my-server-name "blog-vmfest-model0")
;; Where the machine should be created
(def my-node-path "/path/to/vmfest/nodes")
;; Name of the OS model (image) to use and where it can be found
(def my-machine-model-image-name :model_ubuntu_1204_64)
;; Name of the machine model - only :micro is supported
(def my-machine-model-hardware-name :micro)
;; Create the machine
(def my-machine
(vman/instance
my-server
my-server-name
my-machine-model-image-name
my-machine-model-hardware-name
my-node-path
))
;; Start the machine
(vman/start my-machine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment