docs: Change the FreeBSD version 9.2
[snf-image] / docs / usage.rst
1 Usage
2 =====
3
4 .. _sample-images:
5
6 Sample Images
7 ^^^^^^^^^^^^^
8
9 While developing *snf-image*, we created and tested a number of images. The
10 following images are basic installations of some popular Linux distributions,
11 that have been tested with snf-image and provided here for testing purposes:
12
13
14  * Debian Squeeze Base System
15    [`diskdump <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump>`_]
16    [`md5sum <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump.md5sum>`_]
17    [`metadata <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump.meta>`_]
18  * Debian Wheezy Base System
19    [`diskdump <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump>`_]
20    [`md5sum <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.md5sum>`_]
21    [`metadata <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.meta>`_]
22  * Debian Desktop
23    [`diskdump <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump>`_]
24    [`md5sum <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.md5sum>`_]
25    [`metadata <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.meta>`_]
26  * CentOS 6.0
27    [`diskdump <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump>`_]
28    [`md5sum <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump.md5sum>`_]
29    [`metadata <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump.meta>`_]
30  * Fedora Desktop 18
31    [`diskdump <http://cdn.synnefo.org/fedora-18-x86_64.diskdump>`_]
32    [`md5sum <http://cdn.synnefo.org/fedora-18-x86_64.diskdump.md5sum>`_]
33    [`metadata <http://cdn.synnefo.org/fedora-18-x86_64.diskdump.meta>`_]
34  * Ubuntu Desktop LTS 12.04
35    [`diskdump <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump>`_]
36    [`md5sum <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump.md5sum>`_]
37    [`metadata <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump.meta>`_]
38  * Kubuntu LTS 12.04
39    [`diskdump <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump>`_]
40    [`md5sum <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump.md5sum>`_]
41    [`metadata <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump.meta>`_]
42  * Ubuntu Desktop 13.04
43    [`diskdump <http://cdn.synnefo.org/ubuntu_desktop-13.04-x86_64.diskdump>`_]
44    [`md5sum <http://cdn.synnefo.org/ubuntu_desktop-13.04-x86_64.diskdump.md5sum>`_]
45    [`metadata <http://cdn.synnefo.org/ubuntu_desktop-13.04-x86_64.diskdump.meta>`_]
46  * Kubuntu 13.04
47    [`diskdump <http://cdn.synnefo.org/kubuntu_desktop-13.04-x86_64.diskdump>`_]
48    [`md5sum <http://cdn.synnefo.org/kubuntu_desktop-13.04-x86_64.diskdump.md5sum>`_]
49    [`metadata <http://cdn.synnefo.org/kubuntu_desktop-13.04-x86_64.diskdump.meta>`_]
50  * Ubuntu Server 12.04
51    [`diskdump <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump>`_]
52    [`md5sum <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump.md5sum>`_]
53    [`metadata <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump.meta>`_]
54  * OpenSUSE Desktop 12.3
55    [`diskdump <http://cdn.synnefo.org/opensuse_desktop-12.3-x86_64.diskdump>`_]
56    [`md5sum <http://cdn.synnefo.org/opensuse_desktop-12.3-x86_64.diskdump.md5sum>`_]
57    [`metadata <http://cdn.synnefo.org/opensuse_desktop-12.3-x86_64.diskdump.meta>`_]
58  * FreeBSD 9.2
59    [`diskdump <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump>`_]
60    [`md5sum <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.md5sum>`_]
61    [`metadata <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.meta>`_]
62
63 Sample Usage
64 ^^^^^^^^^^^^
65
66 Download an Image
67 +++++++++++++++++
68
69 Download a :ref:`Sample Image <sample-images>` and store it under IMAGE_DIR.
70 Make sure you also have its corresponding metadata file.
71
72 Spawn a diskdump image
73 ++++++++++++++++++++++
74
75 If you want to deploy an image of type diskdump, you
76 need to provide the corresponding *img_properties* as described in the
77 :ref:`Image Format<image-format>` section. If using a diskdump found in the
78 :ref:`sample-images` list, use the *img_properties* described in the image's
79 metadata file. For example, to successfully deploy the
80 *debian_base-7.0-x86_64.diskdump* image file, you need to provide the following
81 image properties:
82
83 | OSFAMILY=linux
84 | ROOT_PARTITION=1
85 | USERS=root
86
87 Hence, the ganeti command for creating a VM from this image file would look
88 like this:
89
90 .. code-block:: console
91
92   gnt-instance add -o snf-image+default \
93     -O img_passwd=1Ki77y,img_format=diskdump,img_id=debian_base-7.0-x86_64,img_properties='{"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"\,"USERS":"root"}' \
94     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server1
95
96 If you don't want to configure the image at all and just copy it to the ganeti
97 provided disk, use the ``EXCLUDE_ALL_TASKS`` image property, like this:
98
99 .. code-block:: console
100
101   gnt-instance add -o snf-image+default \
102     -O img_passwd=1Ki77y,img_format=diskdump,img_id=debian_base-7.0-x86_64,img_properties='{"EXCLUDE_ALL_TASKS":"yes"}' \
103     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server2
104
105 To configure a VM without first copying an image into the hard disk (e.g. if
106 the hard disk is a snapshot from an existing VM's hard disk) you may use the
107 *null* storage back-end like this:
108
109 .. code-block:: console
110
111   gnt-instance add -o snf-image+default \
112     -O img_passwd=1Ki77y,img_format=diskdump,img_id=null,img_properties='{"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"\,"USERS":"root"}' \
113     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server3
114