Kaspar Schiess committed f999951

Documents configuration options

Comments (0)

Files changed (1)


 ### basic vm definition
+A virtual machine definition is written in a Ruby-DSL and looks like this: 
+    virtual_machine "myvm" do
+      # Options go here! You'd need at least one disk to start.
+    end
+Since the definition is Ruby, nothing stops you from doing more complicated 
+things like connecting to a database or generating definitions using method 
+calls. Here's an example we've used in the wild: 
+    def lan name, mac
+      virtual_machine(name) do
+        nic 'eth0', macaddr: mac, via: 'lan0'
+      end
+    end
+    # Allows for very short VM definitions:
+    lan 'vm1', '1:8:20:52:a6:7e'
 ### available options
 Here's a list of configuration options within the virtual_machine declaration:
     Configures the amount of RAM the guest system sees. Note that the qemu 
     on Illumos locks memory down for the guest and never swaps it out. This
     means that you cannot simulate RAM you don't have available. (free)
+        # One gigabyte of RAM should be enough for everyone. (default)
+        ram 1024
+  * vnc <PORT>:
+    Enables VNC server on port <PORT>. Caution: This will listen for
+    connections from all networks and allow unauthorized access to the guests
+    console. Don't use this in real world deployments. Instead, use `vmadm
+    console` or connect directly to the unix socket using socat.
+        # Make vnc listen on a given port: (5900 + display = tcp/ip port)
+        vnc_display 0
+  * extra_arg <ARGUMENT>:
+    Extra argument for QEMU, appended to the QEMU command line on launch. If
+    you'd like to do something that you cannot achieve with the above options, 
+    this is your last resort. 
+    Note that we're interested in extending the DSL for common use cases, so 
+    you might want to mention your extra_arg usage on the mailing list and 
+    get proper treatment from qemu-toolkit. 
+        # Arguments that are appended to the qemu launch command line: 
+        extra_arg '-foo'
 qemu-toolkit-overview(7), qemu-toolkit-install(7),