X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/3d2ca95df350db595b6906a4a150adba4f3f5ed2..a09b9e3d731995eae290bcfa85f897b6931e6d70:/man/gnt-instance.sgml diff --git a/man/gnt-instance.sgml b/man/gnt-instance.sgml index c4dd54d..565b22a 100644 --- a/man/gnt-instance.sgml +++ b/man/gnt-instance.sgml @@ -2,7 +2,7 @@ - February 11, 2009"> + June 08, 2010"> 8"> @@ -22,6 +22,7 @@ 2007 2008 2009 + 2010 Google Inc. &dhdate; @@ -30,12 +31,12 @@ &dhucpackage; &dhsection; - ganeti 2.0 + Ganeti 2.2 &dhpackage; - ganeti instance administration + Ganeti instance administration @@ -50,7 +51,7 @@ The &dhpackage; is used for instance - administration in the ganeti system. + administration in the Ganeti system. @@ -74,10 +75,18 @@ - --disk=N:size=VAL,mode=ro|rw + --disk=N: + size=VAL + adopt=LV + ,mode=ro|rw -s SIZE + --no-ip-check + --no-name-check + --no-start + --no-install + --net=N:options --no-nics @@ -113,24 +122,37 @@ Creates a new instance on the specified host. The instance argument must be in DNS, - but depending on the bridge setup, need not be in the same - network as the nodes in the cluster. + but depending on the bridge/routing setup, need not be in + the same network as the nodes in the cluster. The option specifies the parameters for the disks of the instance. The numbering of disks starts at zero, and at least one disk needs to be passed. For each - disk, at least the size needs to be given, and optionally - the access mode (read-only or the default of read-write) can - also be specified. The size is interpreted (when no unit is - given) in mebibytes. You can also use one of the suffixes + disk, either the size or the adoption source needs to be + given, and optionally the access mode (read-only or the + default of read-write) can also be specified. The size is + interpreted (when no unit is given) in mebibytes. You can + also use one of the suffixes m, g or - t to specificy the exact the units used; + t to specify the exact the units used; these suffixes map to mebibytes, gibibytes and tebibytes. + When using the key in the disk + definition, Ganeti will reuse those volumes (instead of + creating new ones) as the instance's disks. Ganeti will + rename these volumes to the standard format, and (without + installing the OS) will use them as-is for the + instance. This allows migrating instances from non-managed + mode (e.q. plain KVM with LVM) to being managed via + Ganeti. Note that this works only for the `plain' disk + template (see below for template details). + + + Alternatively, a single-disk instance can be created via the option which takes a single argument, the size of the disk. This is similar to the Ganeti 1.2 @@ -147,17 +169,39 @@ + The skips the checks that are + done to see if the instance's IP is not already alive + (i.e. reachable from the master node). + + + + The skips the check for the + instance name via the resolver (e.g. in DNS or /etc/hosts, + depending on your setup). Since the name check is used to + compute the IP address, if you pass this option you must + also pass the option. + + + + If you don't wat the instance to automatically start after + creation, this is possible via the + option. This will leave the + instance down until a subsequent gnt-instance + start command. + + + The NICs of the instances can be specified via the option. By default, one NIC is - created for the instance, with a random MAC, and connected - to the default bridge. Each NIC can take up to three - parameters (all optional): + created for the instance, with a random MAC, and set + up according the the cluster level nic parameters. + Each NIC can take these parameters (all optional): mac - either a value or GENERATE - to generate a new unique MAC + either a value or 'generate' to generate a + new unique MAC @@ -170,13 +214,25 @@ - bridge + mode + + specifies the connection mode for this nic: + routed or bridged. + + + + link - specifies the bridge to attach this NIC - to + in bridged mode specifies the bridge to attach + this NIC to, in routed mode it's intended to + differentiate between different routing tables/instance + groups (but the meaning is dependent on the network + script, see gnt-cluster(8) for more details) + Of these "mode" and "link" are nic parameters, and inherit their + default at cluster level. @@ -188,7 +244,13 @@ The options specifies the operating system to be installed. The available operating systems can - be listed with gnt-os list. + be listed with gnt-os + list. Passing will + however skip the OS installation, allowing a manual import + if so desired. Note that the no-installation mode will + automatically disable the start-up of the instance (without + an OS, it most likely won't be able to start-up + successfully). @@ -291,6 +353,16 @@ interpreted as 'dc'. + + For KVM the boot order is either + cdrom, disk or + network. Please note that older + versions of KVM couldn't netboot from virtio + interfaces. This has been fixed in more recent + versions and is confirmed to work at least with + qemu-kvm 0.11.1. + + @@ -413,6 +485,22 @@ + use_localtime + + Valid for the Xen HVM and KVM hypervisors. + + + A boolean option that specifies if the instance + should be started with its clock set to the + localtime of the machine (when true) or to the UTC + (When false). The default is false, which is useful + for Linux/Unix machines; for Windows OSes, it is + recommended to enable this parameter. + + + + + kernel_path Valid for the Xen PVM and KVM hypervisors. @@ -492,10 +580,186 @@ emulate a serial console for the instance. + + + disk_cache + + Valid for the KVM hypervisor. + + The disk cache mode. It can be either + default to not pass any cache + option to KVM, or one of the KVM cache modes: none + (for direct I/O), writethrough (to use the host cache + but report completion to the guest only when the host + has committed the changes to disk) or writeback (to + use the host cache and report completion as soon as + the data is in the host cache). Note that there are + special considerations for the cache mode depending on + version of KVM used and disk type (always raw file + under Ganeti), please refer to the KVM documentation + for more details. + + + + + + security_model + + Valid for the KVM hypervisor. + + The security model for kvm. Currently one of + none, user or + pool. Under none, the + default, nothing is done and instances are run as + the Ganeti daemon user (normally root). + + + Under user kvm will drop + privileges and become the user specified by the + security_domain parameter. + + + Under pool a global cluster + pool of users will be used, making sure no two + instances share the same user on the same node. + (this mode is not implemented yet) + + + + + + + security_domain + + Valid for the KVM hypervisor. + + Under security model user the + username to run the instance under. It must be a valid + username existing on the host. + + Cannot be set under security model none + or pool. + + + + + + + kvm_flag + + Valid for the KVM hypervisor. + + If enabled the -enable-kvm flag is + passed to kvm. If disabled -disable-kvm is + passed. If unset no flag is passed, and the default running + mode for your kvm binary will be used. + + + + + + + mem_path + + Valid for the KVM hypervisor. + + This option passes the -mem-path argument to kvm with + the path (on the node) to the mount point of the hugetlbfs + file system, along with the -mem-prealloc argument too. + + + + + + + use_chroot + + Valid for the KVM hypervisor. + + This boolean option determines wether to run the KVM + instance in a chroot directory. + + If it is set to true, an empty directory + is created before starting the instance and its path is passed via + the -chroot flag to kvm. + The directory is removed when the instance is stopped. + + + It is set to false by default. + + + + + migration_downtime + + Valid for the KVM hypervisor. + + The maximum amount of time (in ms) a KVM instance is + allowed to be frozen during a live migration, in order to copy + dirty memory pages. Default value is 30ms, but you may need to + increase this value for busy instances. + + + This option is only effective with kvm versions >= 87 + and qemu-kvm versions >= 0.11.0. + + + + + + use_chroot + + Valid for the KVM hypervisor. + + This boolean option determines wether to run the KVM + instance in a chroot directory. + + + If it is set to true, an empty + directory is created before starting the instance and + its path is passed via the + flag to kvm. The directory is removed when the + instance is stopped. + + + It is set to false by + default. + + + + + + cpu_mask + + Valid for the LXC hypervisor. + + The processes belonging to the given instance are + only scheduled on the specified CPUs. + + + + The parameter format is a comma-separated list of CPU IDs or + CPU ID ranges. The ranges are defined by a lower and higher + boundary, separated by a dash. The boundaries are inclusive. + + + + + + + usb_mouse + + Valid for the KVM hypervisor. + + This option specifies the usb mouse type to be used. + It can be mouse or tablet. When + using VNC it's recommended to set it to tablet. + + + + - - @@ -651,7 +915,7 @@ - disk_templace + disk_template The disk template to use for the instance, the same as in the add @@ -674,10 +938,21 @@ - mac, ip, bridge + mac, ip, mode, link Specifications for the one NIC that will be - created for the instance. + created for the instance. 'bridge' is also accepted + as a backwards compatibile key. + + + + nics + + List of nics that will be created for the + instance. Each entry should be a dict, with mac, ip, mode + and link as possible keys. Please don't provide the "mac, + ip, mode, link" parent keys if you use this method for + specifying nics. @@ -711,6 +986,14 @@ + name_check + + Skip the name check for instances; + see the description in the add + command for details. + + + file_storage_dir, file_driver Configuration for the file @@ -746,7 +1029,8 @@ - The command will display the job id for each submitted instance, as follows: + The command will display the job id for each submitted + instance, as follows: # gnt-instance batch-create instances.json instance3: 11224 @@ -762,6 +1046,7 @@ instance5: 11225 remove --ignore-failures + --shutdown-timeout=N --submit instance @@ -784,6 +1069,13 @@ instance5: 11225 + The is used to specify how + much time to wait before forcing the shutdown (xm destroy in xen, + killing the kvm process, for kvm). By default two minutes are + given to each instance to stop. + + + The option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined via @@ -805,7 +1097,10 @@ instance5: 11225 list --no-headers --separator=SEPARATOR + + --units=UNITS -o [+]FIELD,... + --roman instance @@ -823,6 +1118,21 @@ instance5: 11225 + The units used to display the numeric values in the output + varies, depending on the options given. By default, the values + will be formatted in the most appropriate unit. If the + option is given, then the values + are shown in mebibytes to allow parsing by scripts. In both + cases, the option can be used to + enforce a given output unit. + + + + The option allows latin people to better + understand the cluster instances' status. + + + The option takes a comma-separated list of output fields. The available fields and their meaning are: @@ -900,9 +1210,16 @@ instance5: 11225 + oper_vcpus + + the actual number of VCPUs the instance is using + as seen by the hypervisor + + + ip - the ip address ganeti recognizes as associated with + the ip address Ganeti recognizes as associated with the first instance interface @@ -912,10 +1229,18 @@ instance5: 11225 the first instance interface MAC address + + + nic_mode + + the mode of the first instance NIC + (routed or bridged) + + - bridge + nic_link - the bridge of the first instance NIC + the link of the first instance NIC @@ -956,6 +1281,45 @@ instance5: 11225 + ctime + + + the creation time of the instance; note that this + field contains spaces and as such it's harder to + parse + + + if this attribute is not present (e.g. when + upgrading from older versions), then "N/A" will be + shown instead + + + + + mtime + + + the last modification time of the instance; note + that this field contains spaces and as such it's + harder to parse + + + if this attribute is not present (e.g. when + upgrading from older versions), then "N/A" will be + shown instead + + + + + + uuid + + Show the UUID of the instance (generated + automatically by Ganeti) + + + + network_port If the instance has a network port assigned @@ -1015,10 +1379,15 @@ instance5: 11225 - nic.bridge/N + nic.mode/N - The bridge the Nth instance NIC is attached - to. + The mode of the Nth instance NIC + + + + nic.link/N + + The link of the Nth instance NIC @@ -1036,13 +1405,20 @@ instance5: 11225 - nic.bridges + nic.modes - A comma-separated list of all the bridges of the + A comma-separated list of all the modes of the instance's NICs. + nic.links + + A comma-separated list of all the link parameters + of the instance's NICs. + + + nic.count The number of instance nics. @@ -1091,7 +1467,8 @@ instance5: 11225 There is a subtle grouping about the available output fields: all fields except for , - and are + , and + are configuration value and not run-time values. So if you don't select any of the these fields, the query will be satisfied instantly from the cluster configuration, without having to @@ -1121,6 +1498,7 @@ instance5: 11225 -s --static + --roman --all instance @@ -1142,8 +1520,15 @@ instance5: 11225 Use the to get info about all instances, - rather than explicitely passing the ones you're interested in. + rather than explicitly passing the ones you're interested in. + + + + The option can be used to cause envy among + people who like ancient cultures, but are stuck with non-latin-friendly + cluster virtualization technologies. + @@ -1169,6 +1554,15 @@ instance5: 11225 + -t + plain + drbd + + + + --os-name=OS --force-variant + + --submit instance @@ -1176,10 +1570,10 @@ instance5: 11225 Modifies the memory size, number of vcpus, ip address, MAC - address and/or bridge for an instance. It can also add and - remove disks and NICs to/from the instance. Note that you - need to give at least one of the arguments, otherwise the - command complains. + address and/or nic parameters for an instance. It can also + add and remove disks and NICs to/from the instance. Note + that you need to give at least one of the arguments, otherwise + the command complains. @@ -1188,6 +1582,13 @@ instance5: 11225 + The option will change the disk template + of the instance. Currently only conversions between the + plain and drbd disk templates are supported, and the + instance must be stopped before attempting the conversion. + + + The option adds a disk to the instance. The option will add a new NIC to the instance. The available options are the - same as in the add command (mac, ip, - bridge). The will remove the + same as in the add command (mac, ip, link, + mode). The will remove the last NIC of the instance, while the option will change the parameters of the Nth instance NIC. + The option will change the OS + name for the instance (without reinstallation). In case an + OS variant is specified that is not found, then by default + the modification is refused, + unless is passed. An + invalid OS will also be refused, unless + the option is given. + + + The option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined via @@ -1240,6 +1651,8 @@ instance5: 11225 --secondary --all + + -O OS_PARAMETERS --submit instance @@ -1254,7 +1667,8 @@ instance5: 11225 The option switches to an interactive OS reinstall. The user is prompted to select the OS - template from the list of available OS templates. + template from the list of available OS templates. OS parameters + can be overridden using . @@ -1264,8 +1678,7 @@ instance5: 11225 are selected (either by passing multiple arguments or by using the , , or - options), the user must pass both the - and + options), the user must pass the options to skip the interactive confirmation. @@ -1277,7 +1690,6 @@ instance5: 11225 gnt-job info. - @@ -1286,6 +1698,7 @@ instance5: 11225 rename --no-ip-check + --no-name-check --submit instance new_name @@ -1302,6 +1715,14 @@ instance5: 11225 + The skips the check for the + new instance name via the resolver (e.g. in DNS or /etc/hosts, + depending on your setup). Since the name check is used to + compute the IP address, if you pass this option you must + also pass the option. + + + The option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined via @@ -1322,6 +1743,7 @@ instance5: 11225 startup --force + --ignore-offline --force-multiple @@ -1331,6 +1753,10 @@ instance5: 11225 --primary --secondary --all + --tags + --node-tags + --pri-node-tags + --sec-node-tags -H @@ -1384,6 +1810,36 @@ instance5: 11225 arguments accepted) + + --tags + + will start all instances in the cluster with + the tags given as arguments + + + + --node-tags + + will start all instances in the cluster on + nodes with the tags given as arguments + + + + --pri-node-tags + + will start all instances in the cluster on + primary nodes with the tags given as + arguments + + + + --sec-node-tags + + will start all instances in the cluster on + secondary nodes with the tags given as + arguments + + @@ -1395,7 +1851,9 @@ instance5: 11225 Use to start even if secondary disks are - failing. + failing. can be used to ignore + offline primary nodes and mark the instance as started even if + the primary is not available. @@ -1406,10 +1864,10 @@ instance5: 11225 The and options - specify extra, temporary hypervisor and backend parameters - that can be used to start an instance with modified - parameters. They can be useful for quick testing without - having to modify an instance back and forth, e.g.: + specify temporary hypervisor and backend parameters that can + be used to start an instance with modified parameters. They + can be useful for quick testing without having to modify an + instance back and forth, e.g.: # gnt-instance start -H root_args="single" instance1 # gnt-instance start -B memory=2048 instance2 @@ -1418,7 +1876,11 @@ instance5: 11225 instance1 in single-user mode, and the instance instance2 with 2GB of RAM (this time only, unless that is the actual instance - memory size already). + memory size already). Note that the values override the + instance parameters (and not extend them): an instance with + "root_args=ro" when started with -H + root_args=single will result in "single", not + "ro single". @@ -1444,7 +1906,10 @@ instance5: 11225 shutdown + --timeout=N + --force-multiple + --ignore-offline --instance @@ -1452,6 +1917,10 @@ instance5: 11225 --primary --secondary --all + --tags + --node-tags + --pri-node-tags + --sec-node-tags --submit @@ -1468,9 +1937,18 @@ instance5: 11225 + The is used to specify how much time to + wait before forcing the shutdown (xm destroy in xen, killing the kvm + process, for kvm). By default two minutes are given to each instance + to stop. + + + The , , - , and - options are similar as for the + , , + , , + , and + options are similar as for the startup command and they influence the actual instances being shutdown. @@ -1482,6 +1960,12 @@ instance5: 11225 gnt-job info. + + can be used to ignore offline + primary nodes and force the instance to be marked as stopped. This + option should be used with care as it can lead to an + inconsistent cluster state. + Example: @@ -1502,6 +1986,8 @@ instance5: 11225 --ignore-secondaries + --shutdown-timeout=N + --force-multiple @@ -1510,6 +1996,10 @@ instance5: 11225 --primary --secondary --all + --tags + --node-tags + --pri-node-tags + --sec-node-tags --submit @@ -1536,13 +2026,22 @@ instance5: 11225 The , , - , and - options are similar as for the + , , + , , + , and + options are similar as for the startup command and they influence the actual instances being rebooted. + The is used to specify how + much time to wait before forcing the shutdown (xm destroy in xen, + killing the kvm process, for kvm). By default two minutes are + given to each instance to stop. + + + The will skip the interactive confirmation in the case the more than one instance will be affected. @@ -1599,6 +2098,7 @@ instance5: 11225 replace-disks --submit + --early-release -p --disks idx instance @@ -1607,6 +2107,7 @@ instance5: 11225 replace-disks --submit + --early-release -s --disks idx instance @@ -1615,6 +2116,7 @@ instance5: 11225 replace-disks --submit + --early-release --iallocator name --new-secondary NODE @@ -1623,6 +2125,14 @@ instance5: 11225 instance + + replace-disks + --submit + --early-release + --auto + instance + + This command is a generalized form for replacing disks. It is currently only valid for the mirrored (DRBD) disk @@ -1654,6 +2164,15 @@ instance5: 11225 + The fourth form (when using ) will + automatically determine which disks of an instance are faulty and + replace them within the same node. The + option works only when an instance has only faulty disks on + either the primary or secondary node; it doesn't work when + both sides have faulty disks. + + + The option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined via @@ -1661,6 +2180,19 @@ instance5: 11225 + The changes the code so + that the old storage on secondary node(s) is removed early + (before the resync is completed) and the internal Ganeti + locks for the current (and new, if any) secondary node are + also released, thus allowing more parallelism in the cluster + operation. This should be used only when recovering from a + disk failure on the current secondary (thus the old storage + is already broken) or when the storage on the primary node + is known to be fine (thus we won't need the old storage for + potential recovery). + + + Note that it is not possible to select an offline or drained node as a new secondary. @@ -1673,6 +2205,7 @@ instance5: 11225 activate-disks --submit + --ignore-size instance @@ -1702,6 +2235,16 @@ node1.example.com:disk/1:/dev/drbd1 + The option can be used to + activate disks ignoring the currently configured size in + Ganeti. This can be used in cases where the configuration + has gotten out of sync with the real-world (e.g. after a + partially-failed grow-disk operation or due to rounding in + LVM devices). This should not be used in normal cases, but + only when activate-disks fails without it. + + + Note that it is safe to run this command while the instance is already running. @@ -1823,6 +2366,39 @@ node1.example.com:disk/1:/dev/drbd1 + + RECREATE-DISKS + + + recreate-disks + --submit + --disks= + instance + + + Recreates the disks of the given instance, or only a subset + of the disks (if the option is + passed, which must be a comma-separated list of disk + indices, starting from zero). + + + + Note that this functionality should only be used for missing + disks; if any of the given disks already exists, the + operation will fail. While this is suboptimal, + recreate-disks should hopefully not be needed in normal + operation and as such the impact of this is low. + + + + The option is used to send the job to + the master daemon but not wait for its completion. The job + ID will be shown so that it can be examined via + gnt-job info. + + + + @@ -1835,6 +2411,7 @@ node1.example.com:disk/1:/dev/drbd1 failover -f --ignore-consistency + --shutdown-timeout=N --submit instance @@ -1857,6 +2434,13 @@ node1.example.com:disk/1:/dev/drbd1 + The is used to specify how + much time to wait before forcing the shutdown (xm destroy in xen, + killing the kvm process, for kvm). By default two minutes are + given to each instance to stop. + + + The option is used to send the job to the master daemon but not wait for its completion. The job ID will be shown so that it can be examined via @@ -1885,6 +2469,7 @@ node1.example.com:disk/1:/dev/drbd1 migrate -f --non-live + --migration-mode=live|non-live instance @@ -1901,21 +2486,27 @@ node1.example.com:disk/1:/dev/drbd1 - The option will switch (for the - hypervisors that support it) between a "fully live" - (i.e. the interruption is as minimal as possible) migration - and one in which the instance is frozen, its state saved and - transported to the remote node, and then resumed there. This - all depends on the hypervisor support for two different - methods. In any case, it is not an error to pass this - parameter (it will just be ignored if the hypervisor doesn't - support it). + The + and options will + switch (for the hypervisors that support it) between a + "fully live" (i.e. the interruption is as minimal as + possible) migration and one in which the instance is frozen, + its state saved and transported to the remote node, and then + resumed there. This all depends on the hypervisor support + for two different methods. In any case, it is not an error + to pass this parameter (it will just be ignored if the + hypervisor doesn't support it). The + option option will + request a fully-live migration. The default, when neither + option is passed, depends on the hypervisor parameters (and + can be viewed with the gnt-cluster info + command). If the option is passed, the operation changes from migration to attempting recovery from - a failed previous migration. In this mode, ganeti checks if + a failed previous migration. In this mode, Ganeti checks if the instance runs on the correct node (and updates its configuration if not) and ensures the instances's disks are configured correctly. In this mode, the @@ -1949,6 +2540,52 @@ y/[n]/?: y + + MOVE + + + move + -f + -n node + --shutdown-timeout=N + --submit + instance + + + + Move will move the instance to an arbitrary node in the + cluster. This works only for instances having a plain or + file disk template. + + + + Note that since this operation is done via data copy, it + will take a long time for big disks (similar to + replace-disks for a drbd instance). + + + + The is used to specify how + much time to wait before forcing the shutdown (xm destroy in xen, + killing the kvm process, for kvm). By default two minutes are + given to each instance to stop. + + + + The option is used to send the job to + the master daemon but not wait for its completion. The job + ID will be shown so that it can be examined via + gnt-job info. + + + + Example: + +# gnt-instance move -n node3.example.com instance1.example.com + + + +