 exports.create = ->
   # Validates and retrieves the parameters.
   {
-    name
+    installation
+    name_label
     template
+    VDIs
     VIFs
-    VDIs
   } = @getParams {
+    installation: {
+      type: 'object'
+      properties: {
+        method: { type: 'string' }
+        repository: { type: 'string' }
+      }
+    }
+
     # Name of the new VM.
-    name: { type: 'string' }
+    name_label: { type: 'string' }
 
     # TODO: add the install repository!
+    # VBD.insert/eject
+    # Also for the console!
 
     # UUID of the template the VM will be created from.
     template: { type: 'string' }

    try xapi.call 'VM.remove_from_other_config', ref, 'disks'
    xapi.call 'VM.add_to_other_config', ref, 'disks', VDIs

    # Creates the VDIs.
    xapi.call 'VM.provision', ref

  # The VM should be properly created.

  xapi = @getXAPI template

  # Clones the VM from the template.
  ref = xapi.call 'VM.clone', template.ref, name_label

  # Creates associated virtual interfaces.
  $each VIFs, (VIF) ->
