1 Ganeti 2.0 commandline arguments
2 ================================
9 Ganeti 2.0 introduces several new features as well as new ways to
10 handle instance resources like disks or network interfaces. This
11 requires some noticable changes in the way commandline arguments are
14 - extend and modify commandline syntax to support new features
15 - ensure consistent patterns in commandline arguments to reduce cognitive load
20 Ganeti 2.0 introduces several changes in handling instances resources
21 such as disks and network cards as well as some new features. Due to
22 these changes, the commandline syntax needs to be changed
23 significantly since the existing commandline syntax is not able to
29 Design changes for Ganeti 2.0 that require changes for the commandline
30 syntax, in no particular order:
32 - flexible instance disk handling: support a variable number of disks
33 with varying properties per instance,
34 - flexible instance network interface handling: support a variable
35 number of network interfaces with varying properties per instance
36 - multiple hypervisors: multiple hypervisors can be active on the same
37 cluster, each supporting different parameters,
38 - support for device type CDROM (via ISO image)
43 There are several areas of Ganeti where the commandline arguments will change:
45 - Cluster configuration
47 - cluster initialization
48 - cluster default configuration
50 - Instance configuration
52 - handling of network cards for instances,
53 - handling of disks for instances,
54 - handling of CDROM devices and
55 - handling of hypervisor specific options.
57 Notes about device removal/addition
58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 To avoid problems with device location changes (e.g. second network
61 interface of the instance becoming the first or third and the like)
62 the list of network/disk devices is treated as a stack, i.e. devices
63 can only be added/removed at the end of the list of devices of each
64 class (disk or network) for each instance.
69 The commands for gnt-instance will be modified and extended to allow
70 for the new functionality:
72 - the add command will be extended to support the new device and
74 - the modify command continues to handle all modifications to
75 instances, but will be extended with new arguments for handling
78 Network Device Options
79 ~~~~~~~~~~~~~~~~~~~~~~
81 The generic format of the network device option is:
83 --net $DEVNUM[:$OPTION=$VALUE][,$OPTION=VALUE]
85 :$DEVNUM: device number, unsigned integer, starting at 0,
86 :$OPTION: device option, string,
87 :$VALUE: device option value, string.
89 Currently, the following device options will be defined (open to
92 :mac: MAC address of the network interface, accepts either a valid
93 MAC address or the string 'auto'. If 'auto' is specified, a new MAC
94 address will be generated randomly. If the mac device option is not
95 specified, the default value 'auto' is assumed.
96 :bridge: network bridge the network interface is connected
97 to. Accepts either a valid bridge name (the specified bridge must
98 exist on the node(s)) as string or the string 'auto'. If 'auto' is
99 specified, the default brigde is used. If the bridge option is not
100 specified, the default value 'auto' is assumed.
105 The generic format of the disk device option is:
107 --disk $DEVNUM[:$OPTION=$VALUE][,$OPTION=VALUE]
109 :$DEVNUM: device number, unsigned integer, starting at 0,
110 :$OPTION: device option, string,
111 :$VALUE: device option value, string.
113 Currently, the following device options will be defined (open to
116 :size: size of the disk device, either a positive number, specifying
117 the disk size in mebibytes, or a number followed by a magnitude suffix
118 (M for mebibytes, G for gibibytes). Also accepts the string 'auto' in
119 which case the default disk size will be used. If the size option is
120 not specified, 'auto' is assumed. This option is not valid for all
122 :access: access mode of the disk device, a single letter, valid values
125 - w: read/write access to the disk device or
126 - r: read-only access to the disk device.
128 If the access mode is not specified, the default mode of read/write
129 access will be configured.
130 :path: path to the image file for the disk device, string. No default
131 exists. This option is not valid for all disk layout types.
136 To add devices to an already existing instance, use the device type
137 specific option to gnt-instance modify. Currently, there are two
138 device type specific options supported:
140 :--net: for network interface cards
141 :--disk: for disk devices
143 The syntax to the device specific options is similiar to the generic
144 device options, but instead of specifying a device number like for
145 gnt-instance add, you specify the magic string add. The new device
146 will always be appended at the end of the list of devices of this type
147 for the specified instance, e.g. if the instance has disk devices 0,1
148 and 2, the newly added disk device will be disk device 3.
150 Example: gnt-instance modify --net add:mac=auto test-instance
155 Removing devices from and instance is done via gnt-instance
156 modify. The same device specific options as for adding instances are
157 used. Instead of a device number and further device options, only the
158 magic string remove is specified. It will always remove the last
159 device in the list of devices of this type for the instance specified,
160 e.g. if the instance has disk devices 0, 1, 2 and 3, the disk device
161 number 3 will be removed.
163 Example: gnt-instance modify --net remove test-instance
168 Modifying devices is also done with device type specific options to
169 the gnt-instance modify command. There are currently two device type
172 :--net: for network interface cards
173 :--disk: for disk devices
175 The syntax to the device specific options is similiar to the generic
176 device options. The device number you specify identifies the device to
179 Example: gnt-instance modify --disk 2:access=r
184 Ganeti 2.0 will support more than one hypervisor. Different
185 hypervisors have various options that only apply to a specific
186 hypervisor. Those hypervisor specific options are treated specially
187 via the --hypervisor option. The generic syntax of the hypervisor
188 option is as follows:
190 --hypervisor $HYPERVISOR:$OPTION=$VALUE[,$OPTION=$VALUE]
192 :$HYPERVISOR: symbolic name of the hypervisor to use, string,
193 has to match the supported hypervisors. Example: xen-pvm
195 :$OPTION: hypervisor option name, string
196 :$VALUE: hypervisor option value, string
198 The hypervisor option for an instance can be set on instance creation
199 time via the gnt-instance add command. If the hypervisor for an
200 instance is not specified upon instance creation, the default
201 hypervisor will be used.
203 Modifying hypervisor parameters
204 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 The hypervisor parameters of an existing instance can be modified
207 using --hypervisor option of the gnt-instance modify command. However,
208 the hypervisor type of an existing instance can not be changed, only
209 the particular hypervisor specific option can be changed. Therefore,
210 the format of the option parameters has been simplified to omit the
211 hypervisor name and only contain the comma separated list of
214 Example: gnt-instance modify --hypervisor
215 cdrom=/srv/boot.iso,boot_order=cdrom:network test-instance
220 The command for gnt-cluster will be extended to allow setting and
221 changing the default parameters of the cluster:
223 - The init command will be extend to support the defaults option to
224 set the cluster defaults upon cluster initialization.
225 - The modify command will be added to modify the cluster
226 parameters. It will support the --defaults option to change the
231 The generic format of the cluster default setting option is:
233 --defaults $OPTION=$VALUE[,$OPTION=$VALUE]
235 :$OPTION: cluster default option, string,
236 :$VALUE: cluster default option value, string.
238 Currently, the following cluster default options are defined (open to
241 :hypervisor: the default hypervisor to use for new instances,
242 string. Must be a valid hypervisor known to and supported by the
244 :disksize: the disksize for newly created instance disks, where
245 applicable. Must be either a positive number, in which case the unit
246 of megabyte is assumed, or a positive number followed by a supported
247 magnitude symbol (M for megabyte or G for gigabyte).
248 :bridge: the default network bridge to use for newly created instance
249 network interfaces, string. Must be a valid bridge name of a bridge
250 existing on the node(s).
252 Hypervisor cluster defaults
253 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
255 The generic format of the hypervisor clusterwide default setting option is:
257 --hypervisor-defaults $HYPERVISOR:$OPTION=$VALUE[,$OPTION=$VALUE]
259 :$HYPERVISOR: symbolic name of the hypervisor whose defaults you want
261 :$OPTION: cluster default option, string,
262 :$VALUE: cluster default option value, string.