gnt-instance(8)

๐Ÿ“ฆ
version 3.1.0~rc2 ยท 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute

๐ŸŽ€ NAME ๐ŸŽ€

gnt-instance โ€” Ganeti instance administration โœจ (aka your new bestie for wrangling VMs, gnt-instance(8), Version 3.1.0~rc2)


๐Ÿ“œ SYNOPSIS ๐Ÿ“œ

gnt-instance {command} [arguments...]

๐Ÿ’… DESCRIPTION ๐Ÿ’…

So like, the gnt-instance command is the command for instance administration in the Ganeti system. That's it, that's the whole vibe check. ๐Ÿ‘‘


๐ŸŒธ COMMANDS ๐ŸŒธ

๐Ÿฆ‹ Creation/removal/querying ๐Ÿฆ‹

โœจ ADD โœจ

Okay bestie, this is the big one. Buckle up:

add
{-t|--disk-template {diskless | file | plain | drbd | rbd}}
{--disk=*N*: {size=*VAL*[,spindles=*VAL*] | adopt=*LV*}[,options...]
 | {size=*VAL*,provider=*PROVIDER*}[,param=*value*...  ][,options...]
 | {-s|--os-size} SIZE}
[--ip-check] [--name-check] [--no-conflicts-check]
[--no-start] [--no-install] [{--forthcoming | --commit}]
[--net=*N* [:options...]  | --no-nics]
[{-B|--backend-parameters} BEPARAMS]
[{-H|--hypervisor-parameters} HYPERVISOR [: option=*value*...  ]]
[{-O|--os-parameters} param=*value*...  ]
[--os-parameters-private param=*value*...  ]
[--os-parameters-secret param=*value*...  ]
[--file-storage-dir dir_path] [--file-driver {loop | blktap | blktap2}]
{{-n--iallocator} name | {-g|--node-group} nodegroup}
{{-o|--os-type} os-type}
[--submit] [--print-jobid]
[--ignore-ipolicy]
[--no-wait-for-sync]
[{-cno}]
[{--tags [: tag:value...  ]
{instance-name}

Creates a new instance on the specified host. ๐ŸŽ‰ The instance-name argument must be in DNS, but depending on the bridge/routing setup, it does not have to be in the same network as the nodes in the cluster. (Lowkey flexible of it. ๐Ÿ’…)

The disk 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, either the size or the adoption source needs to be given. The size is interpreted (when no unit is given) in mebibytes. You can also use one of the suffixes m, g or t to specify the exact the units used; these suffixes map to mebibytes, gibibytes and tebibytes. ๐ŸŒˆ

Each disk can also take these parameters (all optional):

  • spindles โ€” how many spindles (physical disks on the node) the disk should span.
  • mode โ€” the access mode. Either ro (read-only) or the default rw (read-write).
  • name โ€” this option specifies a name for the disk, which can be used as a disk identifier. An instance can not have two disks with the same name. ๐Ÿšซ
  • vg โ€” the LVM volume group. This works only for LVM and DRBD devices.
  • metavg โ€” this option specifies a different VG for the metadata device. This works only for DRBD devices. If not specified, the default metavg of the node-group (possibly inherited from the cluster-wide settings) will be used.
  • access โ€” if 'userspace', instance will access this disk directly without going through a block device, avoiding expensive context switches with kernel space. This option works only for RBD, Gluster and ExtStorage devices. If not specified, the default access of the node-group (possibly inherited from the cluster-wide settings) will be used.

When creating ExtStorage disks, also arbitrary parameters can be passed, to the ExtStorage provider. Those parameters are passed as additional comma separated options. Therefore, an ExtStorage disk provided by provider pvdr1 with parameters param1, param2 would be passed as --disk 0:size=10G,provider=pvdr1,param1=val1,param2=val2. ๐Ÿ“

When using the adopt 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.g. plain KVM with LVM) to being managed via Ganeti. ๐Ÿฆ‹ Please 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 -s option which takes a single argument, the size of the disk. This is similar to the Ganeti 1.2 version (but will only create one disk). ๐Ÿ‘‘

The minimum disk specification is therefore --disk 0:size=20G (or -s 20G when using the -s option), and a three-disk instance can be specified as --disk 0:size=20G --disk 1:size=4G --disk 2:size=100G. โœจ

The minimum information needed to specify an ExtStorage disk are the size and the provider. For example: --disk 0:size=20G,provider=pvdr1. ๐Ÿ“

The --ip-check option checks that the instance's IP is not already alive (i.e. reachable from the master node). If you pass this option you must also pass the --name-check option, because the name check is used to compute the IP address via the resolver (e.g. in DNS or /etc/hosts, depending on your setup). โš ๏ธ

The --name-check checks for the instance name via the resolver (e.g. in DNS or /etc/hosts, depending on your setup). The name check can be used to compute the IP address (when set to auto). ๐Ÿ”

If you don't want the instance to automatically start after creation, this is possible via the --no-start option. This will leave the instance down until a subsequent gnt-instance start command. ๐Ÿ˜ด

The NICs of the instances can be specified via the --net option. By default, one NIC is created for the instance, with a random MAC, and set up according to 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.
  • ip โ€” specifies the IP address assigned to the instance from the Ganeti side (this is not necessarily what the instance will use, but what the node expects the instance to use). Note that if an IP in the range of a network configured with gnt-network(8) is used, and the NIC is not already connected to it, this network has to be passed in the network parameter if this NIC is meant to be connected to the said network. --no-conflicts-check can be used to override this check. The special value pool causes Ganeti to select an IP from the network the NIC is or will be connected to. The special value auto must be combined with --name-check and will use the resolved IP. One can pick an externally reserved IP of a network along with --no-conflict-check. Note that this IP cannot be assigned to any other instance until it gets released. ๐Ÿ”’
  • mode โ€” specifies the connection mode for this NIC: routed, bridged or openvswitch.
  • link โ€” in bridged or openvswitch mode specifies the interface 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). Note that openvswitch support is also hypervisor dependent.
  • network โ€” derives the mode and the link from the settings of the network which is identified by its name. If the network option is chosen, link and mode must not be specified. Note that the mode and link depend on the network-to-nodegroup connection, thus allowing different nodegroups to be connected to the same network in different ways. ๐ŸŒ
  • name โ€” this option specifies a name for the NIC, which can be used as a NIC identifier. An instance can not have two NICs with the same name. ๐Ÿšซ
  • vlan โ€” in bridged and openvswitch mode specifies the VLANs that the NIC will be connected to. To connect as an access port use n or .n with n being the VLAN ID. To connect as a trunk port use :n[:n]. A hybrid port can be created with .n:n[:n]. For bridged mode, the bridge needs VLAN filtering enabled. Assuming a bridge named gnt-br, this is accomplished by running ip link set dev gnt-br type bridge vlan_filtering 1. Please make sure to only use VLAN IDs accepted by your network equipment (e.g. do not set the PVID) as this will break traffic flow otherwise. ๐Ÿ’€

Of these "mode" and "link" are NIC parameters, and inherit their default at cluster level. Alternatively, if no network is desired for the instance, you can prevent the default of one NIC with the --no-nics option. ๐Ÿ™…โ™€๏ธ

The -o (--os-type) option specifies the operating system to be installed. The available operating systems can be listed with gnt-os list. Passing --no-install 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). ๐Ÿ˜ญ

Passing the --forthcoming option, Ganeti will not at all try to create the instance or its disks. Instead the instance will only be added to the configuration, so that the resources are reserved. If the --commit option is passed, then it is a prerequisite that an instance with that name has already been added to the configuration as a forthcoming instance and the request is to replace this instance by the newly created real one. Note that if the reason for reserving an instance is that DNS names still need to be propagated, the reservation has to be done without --name-check and --ip-check. ๐Ÿ“Œ

The -B (--backend-parameters) option specifies the backend parameters for the instance. If no such parameters are specified, the values are inherited from the cluster. Possible parameters are:

  • maxmem โ€” the maximum memory size of the instance; as usual, suffixes can be used to denote the unit, otherwise the value is taken in mebibytes.
  • minmem โ€” the minimum memory size of the instance; as usual, suffixes can be used to denote the unit, otherwise the value is taken in mebibytes.
  • vcpus โ€” the number of VCPUs to assign to the instance (if this value makes sense for the hypervisor).
  • auto_balance โ€” whether the instance is considered in the N+1 cluster checks (enough redundancy in the cluster to survive a node failure).
  • always_failover โ€” True or False, whether the instance must be failed over (shut down and rebooted) always or it may be migrated (briefly suspended).

Note that before 2.6 Ganeti had a memory parameter, which was the only value of memory an instance could have. With the maxmem/minmem change Ganeti guarantees that at least the minimum memory is always available for an instance, but allows more memory to be used (up to the maximum memory) should it be free. ๐Ÿ’–

The -H (--hypervisor-parameters) option specified the hypervisor to use for the instance (must be one of the enabled hypervisors on the cluster) and optionally custom parameters for this instance. If not other options are used (i.e. the invocation is just -H NAME) the instance will inherit the cluster options. The defaults below show the cluster defaults at cluster creation time. โญ

okay so the possible hypervisor options are as follows, bestie โ€” and yes, every single one matters ๐Ÿ’…

  • boot_order โ€” Valid for the Xen HVM and KVM hypervisors. โœจ

A string value denoting the boot order. This has different meaning for the Xen HVM hypervisor and for the KVM one.

For Xen HVM, the boot order is a string of letters listing the boot devices, with valid device letters being:

  • a โ€” floppy drive
  • c โ€” hard disk
  • d โ€” CDROM drive
  • n โ€” network boot (PXE)

The default is not to set an HVM boot order, which is interpreted as 'dc'.

For KVM the boot order is either "floppy", "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. Also note that if you have set the kernel_path option, that will be used for booting, and this setting will be silently ignored.

  • blockdev_prefix โ€” Valid for the Xen HVM and PVM hypervisors. ๐Ÿฆ‹

Relevant to non-pvops guest kernels, in which the disk device names are given by the host. Allows one to specify xvd, which helps run Red Hat based installers, driven by anaconda.

  • floppy_image_path โ€” Valid for the KVM hypervisor. ๐ŸŽ€

The path to a floppy disk image to attach to the instance. This is useful to install Windows operating systems on Virt/IO disks because you can specify here the floppy for the drivers at installation time.

  • cdrom_image_path โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ’ฟ

The path to a CDROM image to attach to the instance.

  • cdrom2_image_path โ€” Valid for the KVM hypervisor. ๐Ÿ’ฟ

The path to a second CDROM image to attach to the instance. NOTE: This image can't be used to boot the system. To do that you have to use the cdrom_image_path option.

  • nic_type โ€” Valid for the Xen HVM and KVM hypervisors. ๐ŸŒ

This parameter determines the way the network cards are presented to the instance. The possible options are:

  • rtl8139 (default for Xen HVM) (HVM & KVM)
  • ne2k_isa (HVM & KVM)
  • ne2k_pci (HVM & KVM)
  • i82551 (KVM)
  • i82557b (KVM)
  • i82559er (KVM)
  • pcnet (KVM)
  • e1000 (KVM)
  • paravirtual (default for KVM) (HVM & KVM)
  • vif_type โ€” Valid for the Xen HVM hypervisor. ๐Ÿงš

This parameter specifies the vif type of the nic configuration of the instance. Unsetting the value leads to no type being specified in the configuration. Note that this parameter only takes effect when the nic_type is not set. The possible options are:

  • ioemu
  • vif
  • scsi_controller_type โ€” Valid for the KVM hypervisor. ๐Ÿ’…

This parameter specifies which type of SCSI controller to use. The possible options are:

  • lsi [default]
  • megasas
  • virtio-scsi-pci
  • kvm_pci_reservations โ€” Valid for the KVM hypervisor. ๐Ÿ› ๏ธ

The number of PCI slots that QEMU will manage implicitly. By default Ganeti will let QEMU use the first 12 slots (i.e. PCI slots 0-11) on its own and will start adding disks and NICs from the 13rd slot (i.e. PCI slot 12) onwards. So by default one can add 20 PCI devices (32 - 12). To support more than that, this hypervisor parameter should be set accordingly (e.g. to 8).

  • disk_type โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ’พ

This parameter determines the way the disks are presented to the instance. The possible options are:

  • ioemu [default] (HVM & KVM)
  • paravirtual (HVM & KVM)
  • ide (KVM)
  • scsi (KVM)
  • sd (KVM)
  • mtd (KVM)
  • pflash (KVM)
  • cdrom_disk_type โ€” Valid for the KVM hypervisor. ๐Ÿ’ฟ

This parameter determines the way the cdroms disks are presented to the instance. The default behavior is to get the same value of the earlier parameter (disk_type). The possible options are:

  • paravirtual
  • ide
  • scsi
  • sd
  • mtd
  • pflash
  • vnc_bind_address โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ–ฅ๏ธ

Specifies the address that the VNC listener for this instance should bind to. Valid values are IPv4 addresses. Use the address 0.0.0.0 to bind to all available interfaces (this is the default) or specify the address of one of the interfaces on the node to restrict listening to that interface.

  • vnc_password_file โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ”

Specifies the location of the file containing the password for connections using VNC. The default is a file named vnc-cluster-password which can be found in the configuration directory.

  • vnc_tls โ€” Valid for the KVM hypervisor. ๐Ÿ”’

A boolean option that controls whether the VNC connection is secured with TLS.

  • vnc_x509_path โ€” Valid for the KVM hypervisor. ๐Ÿ“œ

If vnc_tls is enabled, this options specifies the path to the x509 certificate to use.

  • vnc_x509_verify โ€” Valid for the KVM hypervisor. โœ…
  • spice_bind โ€” Valid for the KVM hypervisor. ๐ŸŒถ๏ธ

Specifies the address or interface on which the SPICE server will listen. Valid values are:

  • IPv4 addresses, including 0.0.0.0 and 127.0.0.1
  • IPv6 addresses, including :: and ::1
  • names of network interfaces

If a network interface is specified, the SPICE server will be bound to one of the addresses of that interface.

  • spice_ip_version โ€” Valid for the KVM hypervisor. ๐ŸŒถ๏ธ

Specifies which version of the IP protocol should be used by the SPICE server.

It is mainly intended to be used for specifying what kind of IP addresses should be used if a network interface with both IPv4 and IPv6 addresses is specified via the spice_bind parameter. In this case, if the spice_ip_version parameter is not used, the default IP version of the cluster will be used.

  • spice_password_file โ€” Valid for the KVM hypervisor. ๐Ÿ”‘

Specifies a file containing the password that must be used when connecting via the SPICE protocol. If the option is not specified, passwordless connections are allowed.

  • spice_image_compression โ€” Valid for the KVM hypervisor. ๐Ÿ–ผ๏ธ

Configures the SPICE lossless image compression. Valid values are:

  • auto_glz
  • auto_lz
  • quic
  • glz
  • lz
  • off
  • spice_jpeg_wan_compression โ€” Valid for the KVM hypervisor. ๐Ÿ“‰

Configures how SPICE should use the jpeg algorithm for lossy image compression on slow links. Valid values are:

  • auto
  • never
  • always
  • spice_zlib_glz_wan_compression โ€” Valid for the KVM hypervisor. ๐Ÿ“‰

Configures how SPICE should use the zlib-glz algorithm for lossy image compression on slow links. Valid values are:

  • auto
  • never
  • always
  • spice_streaming_video โ€” Valid for the KVM hypervisor. ๐ŸŽฅ

Configures how SPICE should detect video streams. Valid values are:

  • off
  • all
  • filter
  • spice_playback_compression โ€” Valid for the KVM hypervisor. ๐Ÿ”Š

Configures whether SPICE should compress audio streams or not.

  • spice_use_tls โ€” Valid for the KVM hypervisor. ๐Ÿ”

Specifies that the SPICE server must use TLS to encrypt all the traffic with the client.

  • spice_tls_ciphers โ€” Valid for the KVM hypervisor. ๐Ÿ”

Specifies a list of comma-separated ciphers that SPICE should use for TLS connections. For the format, see man cipher(1).

  • spice_use_vdagent โ€” Valid for the KVM hypervisor. ๐Ÿ–ฑ๏ธ

Enables or disables passing mouse events via SPICE vdagent.

  • cpu_type โ€” Valid for the KVM hypervisor. ๐Ÿง 

This parameter determines the emulated cpu for the instance. If this parameter is empty (which is the default configuration), it will not be passed to KVM which defaults to the emulated 'qemu64' type.

Be aware of setting this parameter to "host" if you have nodes with mixed CPU models. Live migration may stop working or crash the instance in this situation.

If you leave this parameter unset or use one of the generic types (e.g. "qemu32", "qemu64", "kvm32" or "kvm64") your instances will not be able to benefit from advanced CPU instructions such as AES-NI or RDRAND. Please be aware these generic CPU types also lack security features such as mitigations to the Meltdown and Spectre family of processor vulnerabilities.

You can query for supported CPU types by running the QEMU/KVM binary with the following parameter:

qemu-system-x86_64 -cpu ?

More information can be found in the Qemu / KVM CPU model configuration documentation. Please check there for the recommended settings.

  • acpi โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ”Œ

A boolean option that specifies if the hypervisor should enable ACPI support for this instance. By default, ACPI is disabled.

ACPI should be enabled for user shutdown detection. See user_shutdown.

  • pae โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿงฉ

A boolean option that specifies if the hypervisor should enable PAE support for this instance. The default is false, disabling PAE support.

  • viridian โ€” Valid for the Xen HVM hypervisor. ๐ŸŸฃ

A boolean option that specifies if the hypervisor should enable viridian (Hyper-V) for this instance. The default is false, disabling viridian support.

  • use_guest_agent โ€” Valid for the KVM hypervisor. ๐Ÿ‘ป

A boolean option that specifies if the hypervisor should enable the QEMU Guest Agent protocol for this instance. By default, the Guest Agent is disabled.

  • use_localtime โ€” Valid for the Xen HVM and KVM hypervisors. ๐Ÿ•ฐ๏ธ
  • the clock boolean โ€” yes bestie, it's a boolean, and it decides whether the instance boots with its clock set to the machine's localtime (when true) or to UTC (when false). Default is false, which is the correct vibe for Linux/Unix machines; for Windows OSes it's recommended to enable this parameter. ๐Ÿ’…
  • kernel_path โ€” valid for the Xen PVM and KVM hypervisors โœจ
    • It's the path (on the node) to the kernel you want to boot the instance with.
    • Xen PVM instances always require this one โ€” no exceptions, no skipping. ๐Ÿ™…โ€โ™€๏ธ
    • For KVM, if this option is empty it causes the machine to load the kernel from its disks instead, and the boot happens accordingly to boot_order. ๐Ÿฆ‹
  • kernel_args โ€” valid for the Xen PVM and KVM hypervisors โœจ
    • Extra arguments to the kernel that will be loaded. This is always used for Xen PVM, while for KVM it is only used if the kernel_path option is also specified.
    • The default setting for this value is simply "ro", which mounts the root disk (initially) in read-only mode. So for example, setting this to single will cause the instance to start in single-user mode.
    • ๐Ÿ‘€ Note that the hypervisor setting serial_console appends "console=ttyS0,<serial_speed>" to the end of kernel_args in KVM.
  • initrd_path โ€” valid for the Xen PVM and KVM hypervisors โœจ
    • The path (on the node) to the initrd to boot the instance with. Xen PVM instances can use this always, while for KVM this option is only used if the kernel_path option is also specified.
    • You can pass here either an absolute filename (the path to the initrd) if you want to use an initrd, or use the format no_initrd_path for no initrd. ๐ŸŽ€
  • root_path โ€” valid for the Xen PVM and KVM hypervisors โœจ
    • The name of the root device. This is always needed for Xen PVM, while for KVM it is only used if the kernel_path option is also specified.
    • Please note: if this setting is an empty string and the hypervisor is Xen, it will not be written to the Xen configuration file. ๐Ÿซถ
  • serial_console โ€” valid for the KVM hypervisor โœจ
    • This boolean says whether to emulate a serial console for the instance.
    • Beware bestie: some versions of KVM have a bug that will make an instance hang when configured to use the serial console unless a connection is made to it within about 2 seconds of the instance's startup. For that case it's recommended to disable this option โ€” which is enabled by default. ๐Ÿ˜ญ
    • Enabling serial console emulation also appends "console=ttyS0,<serial_speed>" to the end of kernel_args in KVM and may interfere with previous settings.
  • serial_speed โ€” valid for the KVM hypervisor โœจ
    • This integer option is the speed of the serial console. Common values are 9600, 19200, 38400, 57600 and 115200: choose the one which works on your system. ๐Ÿ’œ
    • (The default is 38400 for historical reasons, but newer versions of kvm/qemu work with 115200.)
  • disk_cache โ€” valid for the KVM hypervisor โœจ
    • The disk cache mode. It controls QEMU's internal cache.writeback, cache.direct and cache.no-flush settings, based on the table found in man qemu-system-x86_64(1).
    • It supports three 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).
    • The value default has been kept in Ganeti for backwards compatibility and corresponds to writeback.
    • Note that certain disk templates in Ganeti may override the cache mode to allow for safe live migrations. ๐Ÿงš
  • disk_aio โ€” valid for the KVM hypervisor โœจ
    • This parameter controls the way in which KVM interacts with the kernel I/O subsystem.
    • It defaults to threads for backwards compatibility, but on recent installations native or io_uring would be the recommended way.
    • For io_uring to work, QEMU 5.0 and Linux kernel 5.1 are the minimum requirements. ๐Ÿ”ฅ
  • disk_discard โ€” valid for the KVM hypervisor โœจ
    • discard is one of ignore or unmap, and it controls whether discard (also known as trim or unmap) requests are ignored or passed to the filesystem.
    • Some machine types may not support discard requests. ๐Ÿ™ˆ
  • 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, this is 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, accel=kvm is appended to the -machine parameter.
    • Disabling it (or not setting this flag at all) currently does nothing. ๐Ÿฆ‹
  • 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 determines whether to run the KVM instance in a chroot directory.
    • If it's 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.
  • user_shutdown โ€” valid for the KVM hypervisor โœจ
    • This boolean determines whether the KVM instance supports user shutdown detection. This option does not necessarily require ACPI enabled, but ACPI must be enabled for users to poweroff their KVM instances.
    • If it's set to true, the user can shutdown this KVM instance and its status is reported as USER_down.
    • 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.
  • cpu_mask โ€” valid for the Xen, KVM and LXC hypervisors โœจ
    • The processes belonging to the given instance are only scheduled on the specified CPUs.
    • The format of the mask can be given in three forms:
    • First, the word "all", which signifies the common case where all VCPUs can live on any CPU, based on the hypervisor's decisions.
    • Second, 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, and the boundaries are inclusive. In this form, all VCPUs of the instance will be mapped on the selected list of CPUs. Example: 0-2,5, mapping all VCPUs (no matter how many) onto physical CPUs 0, 1, 2 and 5.
    • The last form is used for explicit control of VCPU-CPU pinnings. In this form, the list of VCPU mappings is given as a colon (:) separated list, whose elements are the possible values for the second or first form above. In this form, the number of elements in the colon-separated list _must equal_ the number of VCPUs of the instance.

Examples, bestie ๐Ÿ‘‡ (yes, you can literally copy-paste these):

# Map the entire instance to CPUs 0-2
gnt-instance modify -H cpu_mask=0-2 my-inst

# Map vCPU 0 to physical CPU 1 and vCPU 1 to CPU 3 (assuming 2 vCPUs)
gnt-instance modify -H cpu_mask=1:3 my-inst

# Pin vCPU 0 to CPUs 1 or 2, and vCPU 1 to any CPU
gnt-instance modify -H cpu_mask=1-2:all my-inst

# Pin vCPU 0 to any CPU, vCPU 1 to CPUs 1, 3, 4 or 5, and CPU 2 to
# CPU 0 (backslashes for escaping the comma)
gnt-instance modify -H cpu_mask=all:1\\,3-5:0 my-inst

# Pin entire VM to CPU 0
gnt-instance modify -H cpu_mask=0 my-inst

# Turn off CPU pinning (default setting)
gnt-instance modify -H cpu_mask=all my-inst
  • cpu_cap โ€” valid for the Xen hypervisor โœจ
    • Set the maximum amount of cpu usage by the VM. The value is a percentage between 0 and (100 * number of VCPUs).
    • Default cap is 0: unlimited. ๐ŸŒˆ
  • cpu_weight โ€” valid for the Xen hypervisor โœจ
    • Set the cpu time ratio to be allocated to the VM. Valid values are between 1 and 65535.
    • Default weight is 256.
  • 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". ๐Ÿ–ฑ๏ธ
  • keymap โ€” valid for the KVM hypervisor โœจ
    • This option specifies the keyboard mapping to be used. It is only needed when using the VNC console. For example: "fr" or "en-gb". โŒจ๏ธ
  • reboot_behavior โ€” valid for Xen PVM, Xen HVM and KVM hypervisors โœจ
    • Normally if an instance reboots, the hypervisor will restart it. If this option is set to exit, the hypervisor will treat a reboot as a shutdown instead.
    • It is set to reboot by default.
  • cpu_cores โ€” valid for the KVM hypervisor โœจ
    • Number of emulated CPU cores.
  • cpu_threads โ€” valid for the KVM hypervisor โœจ
    • Number of emulated CPU threads.
  • cpu_sockets โ€” valid for the KVM hypervisor โœจ
    • Number of emulated CPU sockets.
  • soundhw โ€” valid for Xen PVM, Xen HVM and KVM hypervisors โœจ
    • (and that's genuinely all the page says about this one, bestie โ€” no extra lore, no cap ๐Ÿซถ)
  • The soundcard to emulate inside your instance. Please consult Qemu (-audio model=help) for a list of valid soundcard models โ€” bestie, hda or ac97 are probably the most useful ones. ๐ŸŽ€
  • cpuid โ€” Valid for the XEN hypervisor. ๐Ÿ‘‘

Modify the values returned by CPUID instructions run within instances.

This allows you to enable migration between nodes with different CPU attributes like cores, threads, hyperthreading or SS4 support by hiding the extra features where needed. It's giving "make everyone compatible" energy fr fr.

See the XEN documentation for syntax and more information.

  • usb_devices โ€” Valid for the KVM hypervisor.

Space separated list of usb devices. These can be emulated devices or passthrough ones, and each one gets passed to kvm with its own -usbdevice option. See the qemu(1) manpage for the syntax of the possible components. Note that values set with this parameter are split on a space character and currently don't support quoting ๐Ÿ™ˆ. For backwards compatibility reasons, the RAPI interface keeps accepting comma separated lists too.

  • vga โ€” Valid for the KVM hypervisor.

Emulated vga mode, passed the the kvm -vga option.

  • kvm_extra โ€” Valid for the KVM hypervisor.

Any other option to the KVM hypervisor, useful tweaking anything that Ganeti doesn't support. Values with a space in the parameter must be be double quoted. ๐Ÿ’…

  • machine_version โ€” Valid for the KVM hypervisor.

Use in case an instance must be booted with an exact type of machine version (due to e.g. outdated drivers). In case it's not set the default version supported by your version of kvm is used. Ganeti currently only supports the pc types properly. However, you should not set it to pc but rather to a specific version, e.g. pc-i440fx-9.2 if you plan to use live migration. You can obtain the default machine version by running:

kvm -M ?

Look for the line containing (default). Setting it just to pc will cause problems during rolling cluster upgrades, because your instance will live-migrate into a different kvm version which has a different understanding of what exactly "pc" is. ๐Ÿ’€

  • migration_caps โ€” Valid for the KVM hypervisor.

Enable specific migration capabilities by providing a ":" separated list of supported capabilities. QEMU version 1.7.0 defines x-rdma-pin-all, auto-converge, zero-blocks, and xbzrle.

QEMU version 2.5 defines x-postcopy-ram and 2.6 renames this to postcopy-ram. If x-postcopy-ram or postcopy-ram are enabled, Ganeti will automatically move a migration to postcopy mode after a dirty_sync_count of 2. Other than normal live migration, that can recover from dying destination node, it is not possible to recover from dying source node during active postcopy migration. ๐Ÿ˜ญ

Please note that while a combination of xbzrle and auto-converge might speed up the migration process significantly, the first may cause BSOD on Windows8r2 instances running on drbd. Not the vibe, bestie.

  • kvm_path โ€” Valid for the KVM hypervisor.

Path to the userspace KVM (or qemu) program.

  • vhost_net โ€” Valid for the KVM hypervisor.

This boolean option determines whether the tap devices used by the KVM paravirtual nics (virtio-net) will use accelerated data plane, passing network packets directly between host and guest kernel, without going through userspace emulation layer (qemu). ๐Ÿš€

Historically it is set to false by default. New Clusters created with Ganeti-3.1 and newer defaults to true. Everyone is encouraged to enable it.

  • vnet_hdr โ€” Valid for the KVM hypervisor.

This boolean option determines whether the tap devices used by the KVM paravirtual nics (virtio-net) will get created with VNET_HDR (IFF_VNET_HDR) support.

If set to false, it effectively disables offloading on the virio-net interfaces, which prevents host kernel tainting and log flooding, when dealing with broken or malicious virtio-net drivers.

It is set to true by default.

  • virtio_net_queues โ€” Valid for the KVM hypervisor.

Set a number of queues (file descriptors) for tap device to parallelize packets sending or receiving. Tap devices will be created with MULTI_QUEUE (IFF_MULTI_QUEUE) support. This only works with KVM paravirtual nics (virtio-net) and the maximum number of queues is limited to 8. Technically this is an extension of vnet_hdr which must be enabled for multiqueue support.

If set to 1 queue, it effectively disables multiqueue support on the tap and virio-net devices.

For instances it is necessary to manually set number of queues (on Linux using: ethtool -L ethX combined $queues).

It is set to 1 by default.

  • startup_timeout โ€” Valid for the LXC hypervisor.

This integer option specifies the number of seconds to wait for the state of an LXC container changes to "RUNNING" after startup, as reported by lxc-wait. Otherwise we assume an error has occurred and report it.

It is set to 30 by default.

  • extra_cgroups โ€” Valid for the LXC hypervisor.

This option specifies the list of cgroup subsystems that will be mounted alongside the needed ones before starting LXC containers.

Since LXC version >= 1.0.0, LXC strictly requires all cgroup subsystems to be mounted before starting a container. Users can control the list of desired cgroup subsystems for LXC containers by specifying the lxc.cgroup.use parameter in the LXC system configuration file (see: lxc.system.conf(5)). Its default value is "@kernel" which means all cgroup kernel subsystems.

The LXC hypervisor of Ganeti ensures that all cgroup subsystems needed to start an LXC container are mounted, as well as the subsystems specified in this parameter. The needed subsystems are currently cpuset, memory, devices, and cpuacct.

The value of this parameter should be a list of cgroup subsystems separated by a comma (e.g., "net_cls,perf_event,blkio").

If this parameter is not specified, a list of subsystems will be taken from /proc/cgroups instead.

  • drop_capabilities โ€” Valid for the LXC hypervisor.

This option specifies the list of capabilities which should be dropped for a LXC container. Each value of this option must be in the same form as the lxc.cap.drop configuration parameter of lxc.container.conf(5). It is the lower case of the capability name without the "CAP_" prefix (e.g., "sys_module,sys_time"). See capabilities(7) for more details about Linux capabilities. Note that some capabilities are required by the LXC container (see: lxc.container.conf(5)). Also note that the CAP_SYS_BOOT is required (should not be dropped) to perform the soft reboot for the LXC container. โš ๏ธ

The default value is mac_override,sys_boot,sys_module,sys_time.

  • devices โ€” Valid for the LXC hypervisor.

This option specifies the list of devices that can be accessed from inside of the LXC container. Each value of this option must have the same form as the lxc.cgroup.devices.allow configuration parameter of lxc.container.conf(5). It consists of the type (a: all, b: block, c: character), the major-minor pair, and the access type sequence (r: read, w: write, m: mknod), e.g. "c 1:3 rw". If you'd like to allow the LXC container to access /dev/null and /dev/zero with read-write access, you can set this parameter to: "c 1:3 rw,c 1:5 rw". The LXC hypervisor drops all direct device access by default, so if you want to allow the LXC container to access an additional device which is not included in the default value of this parameter, you have to set this parameter manually.

By default, this parameter contains (/dev/null, /dev/zero, /dev/full, /dev/random, /dev/urandom, /dev/aio, /dev/tty, /dev/console, /dev/ptmx and first block of Unix98 PTY slaves) with read-write (rw) access. ๐Ÿซถ

  • extra_config โ€” Valid for the LXC hypervisor.

This option specifies the list of extra config parameters which are not supported by the Ganeti LXC hypervisor natively. Each value of this option must be a valid line of the LXC container config file (see: lxc.container.conf(5)).

This parameter is not set by default.

  • num_ttys โ€” Valid for the LXC hypervisor.

This option specifies the number of ttys (actually ptys) that should be allocated for the LXC container. You can disable pty devices allocation for the LXC container by setting this parameter to 0, but you can't use gnt-instance console in this case. ๐Ÿ™ˆ

It is set to 6 by default.


The -O (--os-parameters) option allows customisation of the OS parameters. The actual parameter names and values depend on the OS being used, but the syntax is the same key=value. For example, setting a hypothetical dhcp parameter to yes can be achieved by:

gnt-instance add -O dhcp=yes ...

You can also specify OS parameters that should not be logged but reused at the next reinstall with --os-parameters-private and OS parameters that should not be logged or saved to configuration with --os-parameters-secret. Bear in mind that:

  • Launching the daemons in debug mode will cause debug logging to happen, which leaks private and secret parameters to the log files. Do not use the debug mode in production. Daemons will emit a warning on startup if they are in debug mode.
  • You will have to pass again all --os-parameters-secret parameters should you want to reinstall this instance.

The -I (--iallocator) option specifies the instance allocator plugin to use (. means the default allocator). If you pass in this option the allocator will select nodes for this instance automatically, so you don't need to pass them with the -n option. For more information please refer to the instance allocator documentation. โœจ

The -g (--node-group) option can be used to create the instance in a particular node group, specified by name. ๐ŸŒธ

The -t (--disk-template) option sets the disk layout type for the instance. If you don't say a disk template, the default one gets used โ€” and the default is just the first one in the list of enabled disk templates, which you can tweak cluster-wide with gnt-cluster modify. The choices for disk templates are, bestie:

  • diskless โ€” makes an instance with literally no disks. It's useful for testing only (or other special cases). That's it, that's the vibe. ๐Ÿซฅ
  • file โ€” disk devices are regular files.
  • sharedfile โ€” disk devices are regular files sitting on a shared directory.
  • plain โ€” disk devices are logical volumes.
  • drbd โ€” disk devices are drbd (version 8.x) stacked on top of lvm volumes.
  • rbd โ€” disk devices are rbd volumes living inside a RADOS cluster.
  • blockdev โ€” disk devices are adopted pre-existent block devices.
  • ext โ€” disk devices come from external shared storage, through the ExtStorage Interface using ExtStorage providers.

The optional second value of -n (--node) is for the drbd template type and it specifies the remote node. ๐Ÿ‘ฏ

If you do not want gnt-instance to sit there waiting for the disk mirror to sync, hit it with the --no-wait-for-sync option.

The --file-storage-dir sets the relative path under the cluster-wide file storage directory where file-based disks get stored. Super useful when you want different subdirectories for different instances. The full path of the directory where the disk files land is: cluster-wide file storage directory + optional subdirectory + instance name. This option is only relevant for instances using the file storage backend.

The --file-driver sets the driver to use for file-based disks. Heads up: currently these drivers work with the xen hypervisor only. This option is only relevant for instances using the file storage backend. Your choices are:

  • loop โ€” kernel loopback driver. It uses loopback devices to access the filesystem within the file. But ngl, running I/O intensive applications in your instance with the loop driver might result in slowdowns ๐Ÿ˜ญ. Also, if you use the loopback driver, consider bumping the max amount of loopback devices (on most systems it's 8) using the max_loop param.
  • blktap โ€” the blktap driver (for Xen hypervisors). To actually use it you should check whether the 'blktapctrl' user space disk agent is running (it's usually started automatically via xend). This user-level disk I/O interface has the advantage of better performance. Especially if you use a network file system (e.g. NFS) to store your instances, this is the recommended choice. โœจ
  • blktap2 โ€” analogous to the blktap driver, but used by newer versions of Xen.

If --ignore-ipolicy is given, any instance policy violations that pop up during this operation are just... ignored. ๐Ÿ™ˆ

The -c and --communication options specify whether to enable/disable instance communication, which is a communication mechanism between the instance and the host.

The --tags option lets tags be applied to the instance, typically to influence the allocator. Multiple tags can be separated with commas.

See ganeti(7) for a description of --submit and other common options.

Example:

# gnt-instance add -t file --disk 0:size=30g -B maxmem=512 -o debian-etch \
  -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
# gnt-instance add -t plain --disk 0:size=30g -B maxmem=1024,minmem=512 \
  -o debian-etch -n node1.example.com instance1.example.com
# gnt-instance add -t plain --disk 0:size=30g --disk 1:size=100g,vg=san \
  -B maxmem=512 -o debian-etch -n node1.example.com instance1.example.com
# gnt-instance add -t drbd --disk 0:size=30g -B maxmem=512 -o debian-etch \
  -n node1.example.com:node2.example.com instance2.example.com
# gnt-instance add -t rbd --disk 0:size=30g -B maxmem=512 -o debian-etch \
  -n node1.example.com instance1.example.com
# gnt-instance add -t ext --disk 0:size=30g,provider=pvdr1 -B maxmem=512 \
  -o debian-etch -n node1.example.com instance1.example.com
# gnt-instance add -t ext --disk 0:size=30g,provider=pvdr1,param1=val1 \
  --disk 1:size=40g,provider=pvdr2,param2=val2,param3=val3 -B maxmem=512 \
  -o debian-etch -n node1.example.com instance1.example.com

๐ŸŒˆ BATCH-CREATE ๐ŸŒˆ

batch-create
[{-I|--iallocator} instance allocator]
{instances_file.json}

This command (similar to the Ganeti 1.2 batcher tool) submits multiple instance creation jobs based on a definition file. That file can contain all the options that are valid when adding an instance โ€” with the one exception of the iallocator field. The IAllocator is, for optimization purposes, only allowed to be set for the whole batch operation using the --iallocator parameter.

The instance file must be a valid-formed JSON file, containing an array of dictionaries with instance creation parameters. All parameters (except iallocator) which are valid for the instance creation OP code are allowed. The most important ones are:

  • instance_name โ€” the FQDN of the new instance.
  • disk_template โ€” the disk template to use for the instance, the same as in the add command.
  • disks โ€” array of disk specifications. Each entry describes one disk as a dictionary of disk parameters.
  • beparams โ€” a dictionary of backend parameters.
  • hypervisor โ€” the hypervisor for the instance.
  • hvparams โ€” a dictionary with the hypervisor options. If not passed, the default hypervisor options will be inherited.
  • 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.
  • pnode, snode โ€” the primary and optionally the secondary node to use for the instance (in case an iallocator script is not used). If those parameters are given, they have to be given consistently for all instances in the batch operation.
  • start โ€” whether to start the instance.
  • ip_check โ€” skip the check for already-in-use instance; see the description in the add command for details.
  • 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 disk type, see the add command for details.

A simple definition for one instance can be (with most of the parameters taken from the cluster defaults):

[
  {
    "mode": "create",
    "instance_name": "instance1.example.com",
    "disk_template": "drbd",
    "os_type": "debootstrap",
    "disks": [{"size":"1024"}],
    "nics": [{}],
    "hypervisor": "xen-pvm"
  },
  {
    "mode": "create",
    "instance_name": "instance2.example.com",
    "disk_template": "drbd",
    "os_type": "debootstrap",
    "disks": [{"size":"4096", "mode": "rw", "vg": "xenvg"}],
    "nics": [{}],
    "hypervisor": "xen-hvm",
    "hvparams": {"acpi": true},
    "beparams": {"maxmem": 512, "minmem": 256}
  }
]

The command will display the job id for each submitted instance, as follows:

# gnt-instance batch-create instances.json
Submitted jobs 37, 38
Note: if the allocator is used for computing suitable nodes for the instances, it will only take into account disk information for the default disk template. That means that even if other disk templates are specified for the instances, storage space information of these disk templates will not be considered in the allocation computation. ๐Ÿ’€

๐Ÿ’… REMOVE ๐Ÿ’…

remove [--ignore-failures] [--shutdown-timeout=*N*] [--submit]
[--print-jobid] [--force] {instance-name}

Remove an instance. This removes all data from the instance and there is no way back. If you're not sure whether you'll use an instance again, use shutdown first and leave it in the shutdown state for a while. ๐Ÿ‘‘

The --ignore-failures option makes the removal proceed even if errors pop up during the removal of the instance (e.g. during the shutdown or the disk removal). If you don't give this option, the command will stop at the first error.

The --shutdown-timeout specifies how much time (in seconds) to wait before forcing the shutdown (e.g. xl destroy in Xen, killing the kvm process for KVM, etc.). By default, two minutes are given to each instance to stop.

The --force option is used to skip the interactive confirmation.

See ganeti(7) for a description of --submit and other common options.

Example:

# gnt-instance remove instance1.example.com

๐Ÿฆ‹ LIST ๐Ÿฆ‹

list
[--no-headers] [--separator=*SEPARATOR*] [--units=*UNITS*] [-v]
[{-o|--output} [+]FIELD,...] [--filter] [instance-name...]

Shows the currently configured instances with memory usage, disk usage, the node they're running on, and their run status. Main character energy, honestly. โœจ

The --no-headers option skips the initial header line. The --separator option takes an argument which denotes what gets used between the output fields. Both of these options are here to help you with scripting.

The units used to display the numeric values in the output varies, depending on the options given. By default, the values get formatted in the most appropriate unit. If the --separator option is given, then the values are shown in mebibytes to allow parsing by scripts. In both cases, the --units option can be used to enforce a given output unit.

The -v option activates verbose mode, which changes the display of special field states (see ganeti(7)).

The -o (--output) option takes a comma-separated list of output fields. The available fields and their meaning are:

  • admin_state โ€” desired state of the instance
  • admin_state_source โ€” who last changed the desired state of the instance
  • admin_up โ€” desired state of the instance
  • be/always_failover โ€” the "always_failover" backend parameter
  • be/auto_balance โ€” the "auto_balance" backend parameter
  • be/maxmem โ€” the "maxmem" backend parameter
  • be/memory โ€” the "maxmem" backend parameter
  • be/minmem โ€” the "minmem" backend parameter
  • be/spindle_use โ€” the "spindle_use" backend parameter
  • be/vcpus โ€” the "vcpus" backend parameter
  • beparams โ€” backend parameters (merged)
  • bridge โ€” bridge of the 1st network interface. the first NIC's bridge, periodt ๐Ÿ’….
  • console โ€” instance console information. console info, very demure โœจ.
  • ctime โ€” creation timestamp. when it was born ๐ŸŽ€.
  • custom_beparams โ€” custom backend parameters. bespoke backend vibes.
  • custom_hvparams โ€” custom hypervisor parameters.
  • custom_nicparams โ€” custom network interface parameters.
  • custom_osparams โ€” custom operating system parameters.
  • disk.count โ€” number of disks. count 'em, bestie.
  • disk.name/0 โ€” name of 1st disk.
  • disk.name/1 โ€” name of 2nd disk.
  • disk.name/2 โ€” name of 3rd disk.
  • disk.name/3 โ€” name of 4th disk.
  • disk.name/4 โ€” name of 5th disk.
  • disk.name/5 โ€” name of 6th disk.
  • disk.name/6 โ€” name of 7th disk.
  • disk.name/7 โ€” name of 8th disk.
  • disk.name/8 โ€” name of 9th disk.
  • disk.name/9 โ€” name of 10th disk.
  • disk.name/10 โ€” name of 11th disk.
  • disk.name/11 โ€” name of 12th disk.
  • disk.name/12 โ€” name of 13th disk.
  • disk.name/13 โ€” name of 14th disk.
  • disk.name/14 โ€” name of 15th disk.
  • disk.name/15 โ€” name of 16th disk.
  • disk.names โ€” list of disk names. all the names, one list, slay ๐ŸŒˆ
  • disk.size/0 โ€” disk size of 1st disk.
  • disk.size/1 โ€” disk size of 2nd disk.
  • disk.size/2 โ€” disk size of 3rd disk.
  • disk.size/3 โ€” disk size of 4th disk.
  • disk.size/4 โ€” disk size of 5th disk.
  • disk.size/5 โ€” disk size of 6th disk.
  • disk.size/6 โ€” disk size of 7th disk.
  • disk.size/7 โ€” disk size of 8th disk.
  • disk.size/8 โ€” disk size of 9th disk.
  • disk.size/9 โ€” disk size of 10th disk.
  • disk.size/10 โ€” disk size of 11th disk.
  • disk.size/11 โ€” disk size of 12th disk.
  • disk.size/12 โ€” disk size of 13th disk.
  • disk.size/13 โ€” disk size of 14th disk.
  • disk.size/14 โ€” disk size of 15th disk.
  • disk.size/15 โ€” disk size of 16th disk.
  • disk.sizes โ€” list of disk sizes. sizes, plural, iconic
  • disk.spindles โ€” list of disk spindles.
  • disk.spindles/0 โ€” spindles of 1st disk.
  • disk.spindles/1 โ€” spindles of 2nd disk.
  • disk.spindles/2 โ€” spindles of 3rd disk.
  • disk.spindles/3 โ€” spindles of 4th disk.
  • disk.spindles/4 โ€” spindles of 5th disk.
  • disk.spindles/5 โ€” spindles of 6th disk.
  • disk.spindles/6 โ€” spindles of 7th disk.
  • disk.spindles/7 โ€” spindles of 8th disk.
  • disk.spindles/8 โ€” spindles of 9th disk.
  • disk.spindles/9 โ€” spindles of 10th disk.
  • disk.spindles/10 โ€” spindles of 11th disk.
  • disk.spindles/11 โ€” spindles of 12th disk.
  • disk.spindles/12 โ€” spindles of 13th disk.
  • disk.spindles/13 โ€” spindles of 14th disk.
  • disk.spindles/14 โ€” spindles of 15th disk.
  • disk.spindles/15 โ€” spindles of 16th disk.
  • disk.uuid/0 โ€” UUID of 1st disk.
  • disk.uuid/1 โ€” UUID of 2nd disk.
  • disk.uuid/2 โ€” UUID of 3rd disk.
  • disk.uuid/3 โ€” UUID of 4th disk.
  • disk.uuid/4 โ€” UUID of 5th disk.
  • disk.uuid/5 โ€” UUID of 6th disk.
  • disk.uuid/6 โ€” UUID of 7th disk.
  • disk.uuid/7 โ€” UUID of 8th disk.
  • disk.uuid/8 โ€” UUID of 9th disk.
  • disk.uuid/9 โ€” UUID of 10th disk.
  • disk.uuid/10 โ€” UUID of 11th disk.
  • disk.uuid/11 โ€” UUID of 12th disk.
  • disk.uuid/12 โ€” UUID of 13th disk.
  • disk.uuid/13 โ€” UUID of 14th disk.
  • disk.uuid/14 โ€” UUID of 15th disk.
  • disk.uuid/15 โ€” UUID of 16th disk.
  • disk.uuids โ€” list of disk UUIDs. all the UUIDs, no cap ๐Ÿ’œ
  • disk_template โ€” instance disk template.
  • disk_usage โ€” total disk space used by the instance on each of its nodes; this is not the disk size visible to the instance, but the usage on the node. important distinction, bestie โ€” don't mix them up ๐Ÿ’…
  • disks_active โ€” desired state of the instance disks.
  • forthcoming โ€” whether the Instance is forthcoming.
  • hv/acpi โ€” the "acpi" hypervisor parameter.
  • hv/blockdev_prefix โ€” the "blockdev_prefix" hypervisor parameter.
  • hv/boot_order โ€” the "boot_order" hypervisor parameter.
  • hv/bootloader_args โ€” the "bootloader_args" hypervisor parameter.
  • hv/bootloader_path โ€” the "bootloader_path" hypervisor parameter.
  • hv/cdrom2_image_path โ€” the "cdrom2_image_path" hypervisor parameter.
  • hv/cdrom_disk_type โ€” the "cdrom_disk_type" hypervisor parameter.
  • hv/cdrom_image_path โ€” the "cdrom_image_path" hypervisor parameter.
  • hv/cpu_cap โ€” the "cpu_cap" hypervisor parameter.
  • hv/cpu_cores โ€” the "cpu_cores" hypervisor parameter.
  • hv/cpu_mask โ€” the "cpu_mask" hypervisor parameter.
  • hv/cpu_sockets โ€” the "cpu_sockets" hypervisor parameter.
  • hv/cpu_threads โ€” the "cpu_threads" hypervisor parameter.
  • hv/cpu_type โ€” the "cpu_type" hypervisor parameter.
  • hv/cpu_weight โ€” the "cpu_weight" hypervisor parameter.
  • hv/cpuid โ€” the "cpuid" hypervisor parameter.
  • hv/device_model โ€” the "device_model" hypervisor parameter.
  • hv/devices โ€” the "devices" hypervisor parameter.
  • hv/disk_aio โ€” the "disk_aio" hypervisor parameter.
  • hv/disk_cache โ€” the "disk_cache" hypervisor parameter.
  • hv/disk_discard โ€” the "disk_discard" hypervisor parameter.
  • hv/disk_type โ€” the "disk_type" hypervisor parameter.
  • hv/drop_capabilities โ€” the "drop_capabilities" hypervisor parameter.
  • hv/extra_cgroups โ€” the "extra_cgroups" hypervisor parameter.
  • hv/extra_config โ€” the "extra_config" hypervisor parameter.
  • hv/floppy_image_path โ€” the "floppy_image_path" hypervisor parameter.
  • hv/init_script โ€” the "init_script" hypervisor parameter.
  • hv/initrd_path โ€” the "initrd_path" hypervisor parameter.
  • hv/kernel_args โ€” the "kernel_args" hypervisor parameter.
  • hv/kernel_path โ€” the "kernel_path" hypervisor parameter.
  • hv/keymap โ€” the "keymap" hypervisor parameter.
  • hv/kvm_extra โ€” the "kvm_extra" hypervisor parameter.
  • hv/kvm_flag โ€” the "kvm_flag" hypervisor parameter.
  • hv/kvm_path โ€” the "kvm_path" hypervisor parameter.
  • hv/kvm_pci_reservations โ€” the "kvm_pci_reservations" hypervisor parameter.
  • hv/machine_version โ€” the "machine_version" hypervisor parameter.
  • hv/mem_path โ€” the "mem_path" hypervisor parameter.
  • hv/migration_caps โ€” the "migration_caps" hypervisor parameter.
  • hv/migration_downtime โ€” the "migration_downtime" hypervisor parameter.
  • hv/nic_type โ€” the "nic_type" hypervisor parameter.
  • hv/num_ttys โ€” the "num_ttys" hypervisor parameter.
  • hv/pae โ€” the "pae" hypervisor parameter.
  • hv/pci_pass โ€” the "pci_pass" hypervisor parameter.
  • hv/reboot_behavior โ€” the "reboot_behavior" hypervisor parameter.
  • hv/root_path โ€” the "root_path" hypervisor parameter.
  • hv/scsi_controller_type โ€” the "scsi_controller_type" hypervisor parameter.
  • hv/security_domain โ€” the "security_domain" hypervisor parameter.
  • hv/security_model โ€” the "security_model" hypervisor parameter.
  • hv/serial_console โ€” the "serial_console" hypervisor parameter.
  • hv/serial_speed โ€” the "serial_speed" hypervisor parameter.
  • hv/soundhw โ€” the "soundhw" hypervisor parameter.
  • hv/spice_bind โ€” the "spice_bind" hypervisor parameter.
  • hv/spice_image_compression โ€” the "spice_image_compression" hypervisor parameter.
  • hv/spice_ip_version โ€” the "spice_ip_version" hypervisor parameter.
  • hv/spice_jpeg_wan_compression โ€” the "spice_jpeg_wan_compression" hypervisor parameter.
  • hv/spice_password_file โ€” the "spice_password_file" hypervisor parameter.
  • hv/spice_playback_compression โ€” the "spice_playback_compression" hypervisor parameter.
  • hv/spice_streaming_video โ€” the "spice_streaming_video" hypervisor parameter.
  • hv/spice_tls_ciphers โ€” the "spice_tls_ciphers" hypervisor parameter.
  • hv/spice_use_tls โ€” the "spice_use_tls" hypervisor parameter.
  • hv/spice_use_vdagent โ€” the "spice_use_vdagent" hypervisor parameter.
  • hv/spice_zlib_glz_wan_compression โ€” the "spice_zlib_glz_wan_compression" hypervisor parameter.
  • hv/startup_timeout โ€” the "startup_timeout" hypervisor parameter.
  • hv/usb_devices โ€” the "usb_devices" hypervisor parameter.
  • hv/usb_mouse โ€” the "usb_mouse" hypervisor parameter.
  • hv/use_bootloader โ€” the "use_bootloader" hypervisor parameter.
  • hv/use_chroot โ€” the "use_chroot" hypervisor parameter.
  • hv/use_guest_agent โ€” the "use_guest_agent" hypervisor parameter.
  • hv/use_localtime โ€” the "use_localtime" hypervisor parameter.
  • hv/user_shutdown โ€” the "user_shutdown" hypervisor parameter.
  • hv/vga โ€” the "vga" hypervisor parameter.
  • hv/vhost_net โ€” the "vhost_net" hypervisor parameter.
  • hv/vif_script โ€” the "vif_script" hypervisor parameter.
  • hv/vif_type โ€” the "vif_type" hypervisor parameter.
  • hv/viridian โ€” the "viridian" hypervisor parameter.
  • hv/virtio_net_queues โ€” the "virtio_net_queues" hypervisor parameter.
  • hv/vnc_bind_address โ€” the "vnc_bind_address" hypervisor parameter.
  • hv/vnc_password_file โ€” the "vnc_password_file" hypervisor parameter.
  • hv/vnc_tls โ€” the "vnc_tls" hypervisor parameter.
  • hv/vnc_x509_path โ€” the "vnc_x509_path" hypervisor parameter.
  • hv/vnc_x509_verify โ€” the "vnc_x509_verify" hypervisor parameter.
  • hv/vnet_hdr โ€” the "vnet_hdr" hypervisor parameter.
  • hvparams โ€” hypervisor parameters (merged). all merged together, cute
  • hypervisor โ€” hypervisor name.
  • ip โ€” IP address of 1st network interface.
  • mac โ€” MAC address of 1st network interface.
  • mtime โ€” modification timestamp.
  • name โ€” instance name.
  • network_port โ€” instance network port if available (e.g. for VNC console).
  • nic.bridge/0 โ€” bridge of 1st network interface.
  • nic.bridge/1 โ€” bridge of 2nd network interface.
  • nic.bridge/2 โ€” bridge of 3rd network interface.
  • nic.bridge/3 โ€” bridge of 4th network interface.
  • nic.bridge/4 โ€” bridge of 5th network interface.
  • nic.bridge/5 โ€” bridge of 6th network interface.
  • nic.bridge/6 โ€” bridge of 7th network interface.
  • nic.bridge/7 โ€” bridge of 8th network interface.
  • nic.bridges โ€” a list holding every network interface's bridge ๐ŸŒ‰
  • nic.count โ€” how many network interfaces there are (the count, bestie) ๐Ÿ”ข
  • nic.ip/0 โ€” IP address of the 1st network interface
  • nic.ip/1 โ€” IP address of the 2nd network interface
  • nic.ip/2 โ€” IP address of the 3rd network interface
  • nic.ip/3 โ€” IP address of the 4th network interface
  • nic.ip/4 โ€” IP address of the 5th network interface
  • nic.ip/5 โ€” IP address of the 6th network interface
  • nic.ip/6 โ€” IP address of the 7th network interface
  • nic.ip/7 โ€” IP address of the 8th network interface
  • nic.ips โ€” a list holding each network interface's IP address
  • nic.link/0 โ€” link of the 1st network interface
  • nic.link/1 โ€” link of the 2nd network interface
  • nic.link/2 โ€” link of the 3rd network interface
  • nic.link/3 โ€” link of the 4th network interface
  • nic.link/4 โ€” link of the 5th network interface
  • nic.link/5 โ€” link of the 6th network interface
  • nic.link/6 โ€” link of the 7th network interface
  • nic.link/7 โ€” link of the 8th network interface
  • nic.links โ€” a list holding each network interface's link
  • nic.mac/0 โ€” MAC address of the 1st network interface
  • nic.mac/1 โ€” MAC address of the 2nd network interface
  • nic.mac/2 โ€” MAC address of the 3rd network interface
  • nic.mac/3 โ€” MAC address of the 4th network interface
  • nic.mac/4 โ€” MAC address of the 5th network interface
  • nic.mac/5 โ€” MAC address of the 6th network interface
  • nic.mac/6 โ€” MAC address of the 7th network interface
  • nic.mac/7 โ€” MAC address of the 8th network interface
  • nic.macs โ€” a list holding each network interface's MAC address
  • nic.mode/0 โ€” mode of the 1st network interface
  • nic.mode/1 โ€” mode of the 2nd network interface
  • nic.mode/2 โ€” mode of the 3rd network interface
  • nic.mode/3 โ€” mode of the 4th network interface
  • nic.mode/4 โ€” mode of the 5th network interface
  • nic.mode/5 โ€” mode of the 6th network interface
  • nic.mode/6 โ€” mode of the 7th network interface
  • nic.mode/7 โ€” mode of the 8th network interface
  • nic.modes โ€” a list holding each network interface's mode
  • nic.name/0 โ€” name address of the 1st network interface
  • nic.name/1 โ€” name address of the 2nd network interface
  • nic.name/2 โ€” name address of the 3rd network interface
  • nic.name/3 โ€” name address of the 4th network interface
  • nic.name/4 โ€” name address of the 5th network interface
  • nic.name/5 โ€” name address of the 6th network interface
  • nic.name/6 โ€” name address of the 7th network interface
  • nic.name/7 โ€” name address of the 8th network interface
  • nic.names โ€” a list holding each network interface's name
  • nic.network.name/0 โ€” network name of the 1st network interface
  • nic.network.name/1 โ€” network name of the 2nd network interface
  • nic.network.name/2 โ€” network name of the 3rd network interface
  • nic.network.name/3 โ€” network name of the 4th network interface
  • nic.network.name/4 โ€” network name of the 5th network interface
  • nic.network.name/5 โ€” network name of the 6th network interface
  • nic.network.name/6 โ€” network name of the 7th network interface
  • nic.network.name/7 โ€” network name of the 8th network interface
  • nic.network/0 โ€” network of the 1st network interface
  • nic.network/1 โ€” network of the 2nd network interface
  • nic.network/2 โ€” network of the 3rd network interface
  • nic.network/3 โ€” network of the 4th network interface
  • nic.network/4 โ€” network of the 5th network interface
  • nic.network/5 โ€” network of the 6th network interface
  • nic.network/6 โ€” network of the 7th network interface
  • nic.network/7 โ€” network of the 8th network interface
  • nic.networks โ€” a list holding each interface's network
  • nic.networks.names โ€” a list holding each interface's network
  • nic.uuid/0 โ€” UUID address of the 1st network interface
  • nic.uuid/1 โ€” UUID address of the 2nd network interface
  • nic.uuid/2 โ€” UUID address of the 3rd network interface
  • nic.uuid/3 โ€” UUID address of the 4th network interface
  • nic.uuid/4 โ€” UUID address of the 5th network interface
  • nic.uuid/5 โ€” UUID address of the 6th network interface
  • nic.uuid/6 โ€” UUID address of the 7th network interface
  • nic.uuid/7 โ€” UUID address of the 8th network interface
  • nic.uuids โ€” a list holding each network interface's UUID
  • nic.vlan/0 โ€” VLAN of the 1st network interface
  • nic.vlan/1 โ€” VLAN of the 2nd network interface
  • nic.vlan/2 โ€” VLAN of the 3rd network interface
  • nic.vlan/3 โ€” VLAN of the 4th network interface
  • nic.vlan/4 โ€” VLAN of the 5th network interface
  • nic.vlan/5 โ€” VLAN of the 6th network interface
  • nic.vlan/6 โ€” VLAN of the 7th network interface
  • nic.vlan/7 โ€” VLAN of the 8th network interface
  • nic.vlans โ€” a list holding each network interface's VLAN
  • nic_link โ€” link of the 1st network interface
  • nic_mode โ€” mode of the 1st network interface
  • nic_network โ€” network of the 1st network interface
  • oper_ram โ€” actual memory usage as seen by the hypervisor ๐Ÿ‘€
  • oper_state โ€” actual state of the instance
  • oper_vcpus โ€” actual number of VCPUs as seen by the hypervisor
  • os โ€” operating system ๐Ÿ–ฅ๏ธ
  • osparams โ€” operating system parameters (merged)
  • pnode โ€” primary node
  • pnode.group โ€” primary node's group
  • pnode.group.uuid โ€” primary node's group UUID
  • sda_size โ€” disk size of the 1st disk
  • sdb_size โ€” disk size of the 2nd disk
  • serial_no โ€” instance object serial number, incremented on each modification
  • snodes โ€” secondary nodes; usually this will just be one node
  • snodes.group โ€” node groups of secondary nodes
  • snodes.group.uuid โ€” node group UUIDs of secondary nodes
  • status โ€” instance status; read this one carefully bestie it's "running" if the instance is set to be running and actually is, "ADMIN_down" if the instance is stopped and is not running, "ERROR_wrongnode" if the instance is running, but not on its designated primary node, "ERROR_up" if the instance should be stopped, but is actually running, "ERROR_down" if the instance should run, but doesn't, "ERROR_nodedown" if the instance's primary node is down, "ERROR_nodeoffline" if the instance's primary node is marked offline, "ADMIN_offline" if the instance is offline and does not use dynamic, "USER_down" if the user shutdown the instance resources ๐Ÿ’€
  • tags โ€” tags ๐Ÿท๏ธ
  • uuid โ€” instance UUID
  • vcpus โ€” the "vcpus" backend parameter

okay so here's a little โœจlife hackโœจ โ€” if the value of the option starts with the character +, the new field(s) get added to the default list instead of replacing it. So you can quickly see the default list plus a few extra fields without retyping the entire list of fields. iconique, no notes ๐Ÿ’…

And there's a subtle grouping thing going on with the available output fields, so listen up: all fields except for oper_state, oper_ram, oper_vcpus and status are configuration values and not run-time values. Which means if you don't select any of these fields, the query gets satisfied instantly from the cluster configuration, without having to ask the remote nodes for the data. This is lowkey a big deal for big clusters โ€” when you only want some data, it makes total sense to specify a reduced set of output fields. ๐Ÿงš

Also: if exactly one argument is given and it appears to be a query filter (see ganeti(7)), the query result is filtered accordingly. For the ambiguous cases (e.g. a single field name as a filter), the --filter (-F) option forces the argument to be treated as a filter (e.g. gnt-instance list -F admin_state). fr fr, that flag is the tiebreaker. ๐Ÿซถ

The default output field list is: name, os, pnode, admin_state, oper_state, oper_ram.


โœจ LIST-FIELDS โœจ

list-fields [field...]

Lists available fields for instances. That's it, that's the whole job ๐ŸŒธ


โœจ INFO โœจ

info [-s | --static] [--roman] {--all | instance-name}

Show detailed information about the given instance(s). Not me being dramatic, but this is different from list โ€” it shows detailed data about the instance's disks (especially useful for the drbd disk template). ๐Ÿฆ‹

If the option -s is used, only information available in the configuration file is returned, without querying nodes, making the operation faster. โšก

Use the --all to get info about all instances, rather than explicitly passing the ones you're interested in. ๐Ÿ‘‘

The --roman option can be used to cause envy among people who like ancient cultures, but are stuck with non-latin-friendly cluster virtualization technologies. ๐Ÿ›๏ธ (yes really, that's what it says, and honestly? iconic.)


โœจ MODIFY โœจ

modify
[{-H|--hypervisor-parameters} HYPERVISOR_PARAMETERS]
[{-B|--backend-parameters} BACKEND_PARAMETERS]
[{-m|--runtime-memory} SIZE]
[--net add[:options...]  |
 --net [N:]add[,options...]  |
 --net [ID:]remove |
 --net ID:modify[,options...]]
[--disk add:size=*SIZE*[,options...]  |
 --disk N:add,size=*SIZE*[,options...]  |
 --disk
N:add,size=*SIZE*,provider=*PROVIDER*[,options...][,param=*value*...  ]
|
 --disk N:attach,{name=*NAME* | uuid=*UUID*}|
 --disk ID:modify[,options...]
 --disk [ID:]remove]
 --disk [ID:]detach]
[{-t rbd } |
 {-t|--disk-template} drbd -n new_secondary] [--no-wait-for-sync] |
 {-t--ext-params} {provider=*PROVIDER*}[,param=*value*...  ] |
 {-t sharedfile | gluster }
| [--file-storage-dir dir_path] [--file-driver {loop | blktap |
blktap2}]
[--new-primary=*node*]
[--os-type=*OS* [--force-variant]]
[{-O|--os-parameters} param=*value*...  ]
[--os-parameters-private param=*value*...  ]
[--offline | --online]
[--submit] [--print-jobid]
[--ignore-ipolicy]
[--no-hotplug]
{instance-name}

Modifies the memory size, number of vcpus, ip address, MAC address and/or NIC parameters for an instance. It can also add and remove disks and NICs to/from the instance. ๐ŸŽ€

Heads up bestie: you need to give at least one of the arguments, otherwise the command complains. It's giving needy, but that's just how it is ๐Ÿ™ˆ

The -H (--hypervisor-parameters), -B (--backend-parameters) and -O (--os-parameters) options specify hypervisor, backend and OS parameter options in the form of name=value[,...]. For details on which options can be specified, see the add command. ๐Ÿ’œ

Okay so the -t / --disk-template option is the one that changes the disk template of the instance. And bestie, conversions between all the available templates are supported โ€” except the diskless and the blockdev templates, bestie, we don't do those. ๐Ÿ’€ For the blockdev disk template there's only partial support, and it acts only as a source template. Because those volumes are adopted pre-existent block devices, conversions targeting this template are just not supported. Also, there is no support for conversions to or from the diskless template. Ngl that's just how it is.

The instance must be stopped before you even attempt the conversion. No cap. ๐Ÿ›‘

When you're changing from the plain to the drbd disk template, a new secondary node must be specified via the -n option. The --no-wait-for-sync option can be used when converting to the drbd template so the instance is available for startup before DRBD has finished resyncing. When changing to a file-based disk template โ€” i.e. file, sharedfile and gluster โ€” the file storage directory and the file driver can be specified via the --file-storage-dir and --file-driver options, respectively. For more deets on these options please refer to the add command section (iykyk). ๐Ÿ’…

When changing to an ext template, the provider's name must be specified. Also, arbitrary parameters can be passed as additional comma separated options. Those parameters, along with the ExtStorage provider, must be passed using either the --ext-params or -e option. It is not allowed to specify existing disk parameters such as the size, mode, name, access, adopt, vg, metavg, provider, or spindles options. ๐Ÿšซ


The -m / --runtime-memory option will change an instance's runtime memory to the given size (in MB if a different suffix is not specified), by ballooning it up or down to the new value. ๐ŸŽˆ


The --disk add:size=SIZE,[options..] option adds a disk to the instance, and --disk N:add,size=SIZE,[options..] will add a disk to the instance at a specific index. The available options are the same as in the add command (spindles, mode, name, vg, metavg and access). By default, gnt-instance waits for the disk mirror to sync. If you do not want this behavior, use the --no-wait-for-sync option. ๐ŸŒธ

When adding an ExtStorage disk, the provider=PROVIDER option is also mandatory and specifies the ExtStorage provider. Also, for ExtStorage disks arbitrary parameters can be passed as additional comma separated options, same as in the add command.

The --disk attach:name=NAME option attaches an existing disk to the instance at the last disk index, and --disk N:attach,name=NAME` will attach a disk to the instance at a specific index. The accepted disk identifiers are its name or uuid. ๐ŸŽ€

The --disk remove option will remove the last disk of the instance. Use --disk ID:remove to remove a disk by its identifier. ID can be the index of the disk, the disk's name or the disk's UUID. The above applies also to the --disk detach option, which removes a disk from an instance but keeps it in the configuration and doesn't destroy it. ๐Ÿซถ

The --disk ID:modify[,options...] will change the options of the disk. Available options are:

  • mode โ€” the access mode. Either ro (read-only) or the default rw (read-write).
  • name โ€” this option specifies a name for the disk, which can be used as a disk identifier. An instance can not have two disks with the same name.

The --net N:add[,options..] will add a new network interface to the instance. The available options are the same as in the add command (mac, ip, link, mode, network).

The --net ID,remove will remove the instance's NIC with ID identifier, which can be the index of the NIC, the NIC's name or the NIC's UUID.

The --net ID:modify[,options..] option will change the parameters of the instance network interface with the ID identifier. โœจ


The option -o / --os-type 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 --force-variant is passed. An invalid OS will also be refused, unless the --force option is given.

The option --new-primary will set the new primary node of an instance, assuming the disks have already been moved manually. Unless the --force option is given, it is verified that the instance is no longer running on its current primary node. ๐Ÿ‘‘


The --online and --offline options are used to transition an instance into and out of the offline state. An instance can be turned offline only if it was previously down. The --online option fails if the instance was not in the offline state, otherwise it changes the instance's state to down. These modifications take effect immediately. โšก

If --ignore-ipolicy is given, any instance policy violations occurring during this operation are ignored.

If --no-hotplug is given, any disk and NIC modifications will not be hot-plugged. The change will take place after the reboot. ๐Ÿ”„

Without the --no-hotplug parameter, Ganeti attempts to perform the operation hot if possible. Hotplug is currently supported only for disk and NIC modifications in the KVM hypervisor. If hotplug fails (for any reason) a warning is printed but execution is continued. For existing NIC modification interactive verification is needed unless the --force option is passed.

See ganeti(7) for a description of --submit and other common options.

Most of the changes take effect at the next restart. If the instance is running, there is no effect on the instance. ๐Ÿ™ˆ

REINSTALL ๐Ÿ’–

reinstall [{-o|--os-type} os-type] [--select-os] [-f force]
[--force-multiple]
[--instance | --node | --primary | --secondary | --all]
[{-O|--os-parameters} OS_PARAMETERS]
[--os-parameters-private} OS_PARAMETERS]
[--os-parameters-secret} OS_PARAMETERS]
[--submit] [--print-jobid]
{instance...}

Reinstalls the operating system on the given instance(s). The instance(s) must be stopped when running this command. If the -o / --os-type is specified, the operating system is changed. ๐Ÿฆ‹

The --select-os option switches to an interactive OS reinstall. The user is prompted to select the OS template from the list of available OS templates. OS parameters can be overridden using -O / --os-parameters (more documentation for this option is under the add command).

Since this is a potentially dangerous command, the user will be required to confirm this action, unless the -f flag is passed. ๐Ÿ’€

When multiple instances are selected (either by passing multiple arguments or by using the --node, --primary, --secondary or --all options), the user must pass the --force-multiple options to skip the interactive confirmation.

See ganeti(7) for a description of --submit and other common options.


RENAME ๐ŸŽ€

rename [--ip-check] [--name-check]
[--submit] [--print-jobid]
{instance} {new_name}

Renames the given instance. The instance must be stopped when running this command. ๐ŸŒธ

The --name-check checks for the new instance name via the resolver (e.g. in DNS or /etc/hosts, depending on your setup) and that the resolved name matches the new name. In addition the --ip-check can be used to prevent duplicate IPs, by checking that the new name's IP is not already alive (i.e. reachable from the master node).

Note that you can rename an instance to its same name, to force re-executing the os-specific rename script for that instance, if needed. Iconic behaviour honestly. ๐Ÿ’…

See ganeti(7) for a description of --submit and other common options.


Starting/stopping/connecting to console ๐Ÿš€

STARTUP โœจ

startup
[--force] [--ignore-offline]
[--force-multiple] [--no-remember]
[--instance | --node | --primary | --secondary | --all |
--tags | --node-tags | --pri-node-tags | --sec-node-tags]
[{-H|--hypervisor-parameters} key=value...]
[{-B|--backend-parameters} key=value...]
[--submit] [--print-jobid] [--paused]
{instance...}

Starts one or more instances, depending on the following options. The four available modes are:

  • --instance โ€” will start the instances given as arguments (at least one argument required); this is the default selection
  • --node โ€” will start the instances who have the given node as either primary or secondary
  • --primary โ€” will start all instances whose primary node is in the list of nodes passed as arguments (at least one node required)
  • --secondary โ€” will start all instances whose secondary node is in the list of nodes passed as arguments (at least one node required)
  • --all โ€” will start all instances in the cluster (no 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
Note that although you can pass more than one selection option, the last one wins, so in order to guarantee the desired result, don't pass more than one such option. ๐Ÿ™ˆ

Use --force to start even if secondary disks are failing. --ignore-offline can be used to ignore offline primary nodes and mark the instance as started even if the primary is not available.

The --force-multiple will skip the interactive confirmation in the case that more than one instance will be affected.

The --no-remember option will perform the startup but not change the state of the instance in the configuration file (if it was stopped before, Ganeti will still think it needs to be stopped). This can be used for testing, or for a one shot-start where you don't want the watcher to restart the instance if it crashes. ๐Ÿซถ

The -H / --hypervisor-parameters and -B / --backend-parameters options 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 kernel_args="single" instance1
# gnt-instance start -B maxmem=2048 instance2

The first form will start the instance 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). Note that the values override the instance parameters (and not extend them): an instance with "kernel_args=ro" when started with -H kernel_args=single will result in "single", not "ro single". No cap. ๐Ÿ”ฅ

The --paused option is only valid for Xen and kvm hypervisors. This pauses the instance at the start of bootup, awaiting gnt-instance console to unpause it, allowing the entire boot process to be monitored for debugging. ๐Ÿ›

ok bestie real quick โ€” peep ganeti(7) for the tea on --submit and all the other common options, k? iykyk. ๐Ÿ’…

Example:

# gnt-instance start instance1.example.com
# gnt-instance start --node node1.example.com node2.example.com
# gnt-instance start --all

โœจ SHUTDOWN โœจ

shutdown
[--timeout=*N*]
[--force] [--force-multiple] [--ignore-offline] [--no-remember]
[--instance | --node | --primary | --secondary | --all |
--tags | --node-tags | --pri-node-tags | --sec-node-tags]
[--submit] [--print-jobid]
{instance...}

So this one stops one or more instances, right? But here's the drama: if the instance won't stop nicely within a hardcoded interval (currently 2 minutes), Ganeti will straight up forcibly stop it โ€” which is literally the equivalent of reaching behind a physical machine and yanking the power cord. ๐Ÿ’€

The --timeout option is how you say how much time (in seconds) to wait before the forcing happens (like xl destroy in Xen, or killing the kvm process for KVM, etc.). By default every instance gets two minutes to get its life together and stop.

The --instance, --node, --primary, --secondary, --all, --tags, --node-tags, --pri-node-tags and --sec-node-tags options work basically the same as they do for the startup command, and they're what decides which actual instances get shut down. ๐ŸŽฏ

--ignore-offline lets you ignore offline primary nodes and just force the instance to be marked as stopped. Handle with care though, because it can leave your cluster state inconsistent. ๐Ÿ™ˆ

Use --force when you need to shut down an instance that's already marked as offline. Super useful if an offline instance ends up in the ERROR_up state, for example.

The --no-remember option performs the shutdown but does not change the instance's state in the configuration file (so if it was running before, Ganeti will still think it needs to be running). Iconic for a cluster-wide shutdown where some instances are marked up and some are marked down and you do not want to touch the running state: you just disable the watcher, shut down every instance with --no-remember, and then when the watcher comes back on it restores the correct runtime state for all of them. โœจ

See ganeti(7) for a description of --submit and other common options.

Example:

# gnt-instance shutdown instance1.example.com
# gnt-instance shutdown --all

๐ŸŒธ REBOOT ๐ŸŒธ

reboot
[{-t|--type} REBOOT-TYPE]
[--ignore-secondaries]
[--shutdown-timeout=*N*]
[--force-multiple]
[--instance | --node | --primary | --secondary | --all |
--tags | --node-tags | --pri-node-tags | --sec-node-tags]
[--submit] [--print-jobid]
[instance...]

Reboots one or more instances, periodt. The kind of reboot you get depends on the value of -t (--type):

  • a soft reboot does a hypervisor reboot
  • a hard reboot does an instance stop, recreates the hypervisor config for the instance, and starts the instance
  • a full reboot does the equivalent of gnt-instance shutdown && gnt-instance startup

The default is hard reboot. ๐Ÿ‘‘

For the hard reboot, the --ignore-secondaries option ignores errors on the secondary node while re-assembling the instance disks.

The --instance, --node, --primary, --secondary, --all, --tags, --node-tags, --pri-node-tags and --sec-node-tags options are similar as for the startup command, and they influence the actual instances being rebooted.

The --shutdown-timeout is how you specify how much time (in seconds) to wait before forcing the shutdown (xl destroy in xen, killing the kvm process, for kvm). By default two minutes are given to each instance to stop. โณ

The --force-multiple will skip the interactive confirmation in the case that more than one instance will be affected. (no "are you sure bestie" moment, it just goes)

See ganeti(7) for a description of --submit and other common options.

Example:

# gnt-instance reboot instance1.example.com
# gnt-instance reboot --type=full instance1.example.com

๐Ÿฆ‹ CONSOLE ๐Ÿฆ‹

console [--show-cmd] {instance}

Connects to the console of the given instance. If the instance is not up, you get an error, sorry babe. Use the --show-cmd option to display the command instead of actually executing it. ๐Ÿ‘€

For HVM instances, this will attempt to connect to the serial console of the instance. To connect to the virtualized "physical" console of a HVM instance, use a VNC client with the connection info from the info command.

For Xen/kvm instances, if the instance is paused, this attempts to unpause the instance after waiting a few seconds for the connection to the console to be made.

Example:

# gnt-instance console instance1.example.com

๐Ÿ’ฟ Disk management ๐Ÿ’ฟ


๐Ÿ’– REPLACE-DISKS ๐Ÿ’–

replace-disks [--submit] [--print-jobid] [--early-release]
[--ignore-ipolicy] {-p} [--disks idx] {instance-name}

replace-disks [--submit] [--print-jobid] [--early-release]
[--ignore-ipolicy] {-s} [--disks idx] {instance-name}

replace-disks [--submit] [--print-jobid] [--early-release]
[--ignore-ipolicy]
{{-I|--iallocator} name | {{-n|--new-secondary} node }
{instance-name}

replace-disks [--submit] [--print-jobid] [--early-release]
[--ignore-ipolicy] {-a|--auto} {instance-name}

This command is the generalized form for replacing disks. rn it's only valid for the mirrored (DRBD) disk template. no cap.

Okay so, the first form (when you pass -p) replaces the disks on the primary, while the second form (when you pass -s) replaces the disks on the secondary node. For these two cases โ€” since the node doesn't change โ€” you can run the replace for only a subset of the disks, using the --disks option, which takes a list of comma-delimited disk indices (zero-based), e.g. 0,2 to replace only the first and third disks. ๐ŸŽฏ

The third form (when you pass either --iallocator or --new-secondary) is designed to change the secondary node of the instance. Specifying --iallocator makes the new secondary get picked automatically by the specified allocator plugin (use . to indicate the default allocator), otherwise the new secondary node will be the one you chose manually via --new-secondary.

Note: it is not possible to select an offline or drained node as a new secondary. ๐Ÿšซ

The fourth form (when using --auto) automatically figures out which disks of an instance are faulty and replaces them within the same node. The --auto option only works when an instance has only faulty disks on either the primary or secondary node โ€” it does not work when both sides have faulty disks.

The --early-release changes the code so the old storage on secondary node(s) gets removed early (before the resync is completed) and the internal Ganeti locks for the current (and new, if any) secondary node are also released, which allows more parallelism in the cluster operation. Only use this when you're recovering from a disk failure on the current secondary (so the old storage is already broken anyway) or when the storage on the primary node is known to be fine (so you won't need the old storage for potential recovery).

The --ignore-ipolicy lets the command ignore instance policy violations if replace-disks changes groups and the instance would violate the new group's instance policy.

See ganeti(7) for a description of --submit and other common options.


โœจ ACTIVATE-DISKS โœจ

activate-disks [--submit] [--print-jobid] [--ignore-size]
[--wait-for-sync] {instance-name}

Activates the block devices of the given instance. If it works, the command shows you the location and name of the block devices:

node1.example.com:disk/0:/dev/drbd0
node1.example.com:disk/1:/dev/drbd1

In this example, node1.example.com is the name of the node on which the devices have been activated. The disk/0 and disk/1 are the Ganeti-names of the instance disks โ€” how they show up inside the instance is hypervisor-specific, so don't @ me. โ€‹/dev/drbd0 and /dev/drbd1 are the actual block devices as visible on the node. ๐Ÿ’…

The --ignore-size option can be used to activate disks while ignoring the currently configured size in Ganeti. This is for when 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). Do not use this in normal cases โ€” only when activate-disks fails without it. ๐Ÿ™ˆ

The --wait-for-sync option ensures the command returns only after the instance's disks are synchronised (mostly for DRBD). This can be useful for ensuring consistency, since otherwise there are no commands that can wait until synchronisation is done. But heads up: when you pass this option, the command will have additional output, which makes it harder to parse the disk information.

Note: it is safe to run this command while the instance is already running. โœ…

See ganeti(7) for a description of --submit and other common options.


๐ŸŽ€ DEACTIVATE-DISKS ๐ŸŽ€

deactivate-disks [-f] [--submit] [--print-jobid] {instance-name}

De-activates the block devices of the given instance. But listen โ€” if you run this for an instance with a drbd disk template while it's running, it will not be able to shut down the block devices on the primary node, but it will shut down the block devices on the secondary nodes, thus breaking the replication. ๐Ÿ˜ญ

The -f/--force option skips the checks that the instance is down. Normally, if the hypervisor is confused and we can't talk to it, Ganeti will refuse to deactivate the disks โ€” but with this option passed it skips that check and goes straight to trying to deactivate the disks. It can still fail though, if the instance is actually running or due to other issues. bestie, it's giving "fingers crossed" energy.

See ganeti(7) for a description of --submit and other common options.


๐ŸŒˆ GROW-DISK ๐ŸŒˆ

grow-disk [--no-wait-for-sync] [--submit] [--print-jobid]
[--absolute]
{instance-name} {disk} {amount}

Grows an instance's disk. This is only possible for instances with a plain, drbd, file, sharedfile, rbd or ext disk template. For the ext template to work, the ExtStorage provider should also support growing โ€” meaning it has a grow script that actually grows the volume of the external shared storage. ๐ŸŒฑ

Big important note: this command only changes the block device size โ€” it will not grow the actual filesystems, partitions, etc. that live on that disk.

So usually you'll need to:

  1. use gnt-instance grow-disk
  2. reboot the instance (later, at a convenient time)
  3. use a filesystem resizer, such as ext2online(8) or xfs_growfs(8) to resize the filesystem, or use fdisk(8) to change the partition table on the disk

The disk argument is the index of the instance disk to grow. The amount argument is given as a number which can have a suffix (like the disk size in instance create); if the suffix is missing, the value will be interpreted as mebibytes. ๐Ÿซถ

By default, the amount value is the growth you want, like the delta โ€” so an amount of 1G takes a disk from 3G to 4G, cute right? But if you pass the optional --absolute parameter, then amount isn't a delta at all, it's the final size you want the disk to be. So an amount of 8G takes a disk of size 4G up to 8G. ๐Ÿ’…

For instances with a drbd template, heads up: the disk grow operation might finish on one node and fail on the other. That leaves the instance with different-sized LVs on the two nodes, which lowkey sounds scary but won't create problems โ€” except for unused space. ๐Ÿซถ

If you don't wanna wait around for the new disk region to sync, use the --no-wait-for-sync option. Go do something else bestie. โœจ

See ganeti(7) for a description of --submit and other common options.

Example (increase the first disk for instance1 by 16GiB):

# gnt-instance grow-disk instance1.example.com 0 16g

Example for increasing the disk size to a certain size:

# gnt-instance grow-disk --absolute instance1.example.com 0 32g
Also note that disk shrinking is not supported โ€” it's giving one-way street. Use gnt-backup export and then gnt-backup import to reduce the disk size of an instance. ๐Ÿ’€

๐Ÿฉน RECREATE-DISKS ๐Ÿฉน

recreate-disks [--submit] [--print-jobid]
[{-n node1:[node2] | {-I|--iallocator name}}]
[--disk=*N*[:[size=*VAL*][,spindles=*VAL*][,mode=*ro|rw*]]]
{instance-name}

Recreates all of the disks of the given instance, or just a subset. ๐ŸŽ€

Note that this functionality should only be used for missing disks. If any of the given disks already exists, the operation will fail. Yeah, this is suboptimal, but recreate-disks should hopefully not be needed in normal operation, so the impact of that is low. No cap.

If you only want a subset recreated, you can specify any number of disk options. It expects a disk index plus an optional list of disk parameters to change. While recreating disks, only size, spindles, and mode can be changed. And to recreate all disks while changing parameters on just a subset, a --disk option must be given for every disk of the instance. Periodt.

Optionally the instance's disks can be recreated on different nodes. This is iconic if, for example, the original nodes of the instance have gone down (and are marked offline), so we can't recreate on the same nodes. To do that, pass the new node(s) via the -n option, with a syntax similar to the add command. The number of nodes passed must equal the number of nodes that the instance currently has. Note that changing nodes is only allowed when all disks are replaced, e.g. when no --disk option is passed. ๐ŸŒˆ

Another method of choosing which nodes to place the instance on is using the specified iallocator, by passing the --iallocator option. The primary and secondary nodes will be chosen by the specified iallocator plugin, or by the default allocator if . is specified.

See ganeti(7) for a description of --submit and other common options.


๐Ÿšš Recovery/moving ๐Ÿšš

๐Ÿ”„ FAILOVER ๐Ÿ”„

failover [-f] [--ignore-consistency] [--ignore-ipolicy]
[--shutdown-timeout=*N*]
[{-n--iallocator} name]
[--cleanup]
[--submit] [--print-jobid]
{instance-name}

Failover will stop the instance (if it's running), change its primary node, and if it was originally running it'll start it again โ€” on the new primary, obvi. This works for instances with a drbd template (in which case you can only fail to the secondary node) and for externally mirrored templates (sharedfile, blockdev, rbd and ext) (in which case you can fail to any other node). โœจ

If the instance's disk template is of type sharedfile, blockdev, rbd or ext, then you can explicitly specify the target node (which can be any node) using the -n or --target-node option, or specify an iallocator plugin using the -I or --iallocator option. If you omit both, the default iallocator will be used to specify the target node.

If the instance's disk template is of type drbd, the target node is automatically selected as the drbd's secondary node. Changing the secondary node is possible with a replace-disks operation. ๐Ÿฆ‹

Normally the failover will check the consistency of the disks before failing over the instance. If you're trying to migrate instances off a dead node, this will fail. Use the --ignore-consistency option for this purpose.

Note that this option can be dangerous โ€” errors in shutting down the instance will be ignored, which can result in possibly having the instance running on two machines in parallel (on disconnected DRBD drives). ๐Ÿ˜ญ This flag requires the source node to be marked offline first to succeed.

The --shutdown-timeout is used to specify how much time (in seconds) to wait before forcing the shutdown (xl destroy in xen, killing the kvm process, for kvm). By default two minutes are given to each instance to stop. โณ

If --ignore-ipolicy is given, any instance policy violations occurring during this operation are ignored.

If the --cleanup option is passed, the operation changes from performing a failover to attempting recovery from a failed previous failover. In this mode, Ganeti checks if the instance runs on the correct node (and updates its configuration if not) and ensures the instance's disks are configured correctly. ๐Ÿ’–

See ganeti(7) for a description of --submit and other common options.

Example:

# gnt-instance failover instance1.example.com

For externally mirrored templates also -n is available:

# gnt-instance failover -n node3.example.com instance1.example.com

๐Ÿ›ซ MIGRATE ๐Ÿ›ซ

migrate [-f] [--allow-failover] [--non-live]
[--migration-mode=live|non-live] [--ignore-ipolicy]
[--ignore-hvversions]
[--no-runtime-changes] [--submit] [--print-jobid]
[{-n--iallocator} name] {instance-name}

migrate [-f] --cleanup [--submit] [--print-jobid] {instance-name}

Migrate will move the instance to its secondary node without shutdown. Slay. As with failover, it works for instances having the drbd disk template or an externally mirrored disk template type such as sharedfile, blockdev, rbd or ext. ๐Ÿ’…

If the instance's disk template is of type sharedfile, blockdev, rbd or ext, then you can explicitly specify the target node (which can be any node) using the -n or --target-node option, or specify an iallocator plugin using the -I or --iallocator option. If you omit both, the default iallocator will be used to specify the target node. Alternatively, the default iallocator can be requested by specifying . as the name of the plugin. ๐ŸŒธ

If the instance's disk template is of type drbd, the target node is automatically selected as the drbd's secondary node. Changing the secondary node is possible with a replace-disks operation.

The migration command needs a perfectly healthy instance for drbd instances, since we rely on the dual-master capability of drbd8 and the disks of the instance are not allowed to be degraded. Vibe check: passed or it's not happening. ๐Ÿ’€

The --non-live and --migration-mode=non-live options will switch (for the hypervisors that support it) between a "fully live" migration (i.e. the interruption is as minimal as possible) 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'll just be ignored if the hypervisor doesn't support it. The --migration-mode=live 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 --cleanup option is passed, the operation changes from migration to attempting recovery from 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' disks are configured correctly. In this mode, the --non-live option is ignored. ๐Ÿ™ˆ

The option -f will skip the prompting for confirmation.

If --allow-failover is specified it tries to fallback to failover if it already can determine that a migration won't work (e.g. if the instance is shut down). Please note that the fallback will not happen during execution. If a migration fails during execution it still fails. ๐Ÿ˜ญ

If --ignore-ipolicy is given, any instance policy violations occurring during this operation are ignored.

Normally, Ganeti will verify that the hypervisor versions on source and target are compatible and error out if they are not. If --ignore-hvversions is given, Ganeti will only warn in this case. ๐Ÿซถ

The --no-runtime-changes option forbids migrate to alter an instance's runtime before migrating it (eg. ballooning an instance down because the target node doesn't have enough available memory).

If an instance has the backend parameter always_failover set to true, then the migration is automatically converted into a failover.

See ganeti(7) for a description of --submit and other common options.

Example (and expected output):

# gnt-instance migrate instance1
Instance instance1 will be migrated. Note that migration
might impact the instance if anything goes wrong (e.g. due to bugs in
the hypervisor). Continue?
y/[n]/?: y
Migrating instance instance1.example.com
* checking disk consistency between source and target
* switching node node2.example.com to secondary mode
* changing into standalone mode
* changing disks into dual-master mode
* wait until resync is done
* preparing node2.example.com to accept the instance
* migrating instance to node2.example.com
* switching node node1.example.com to secondary mode
* wait until resync is done
* changing into standalone mode
* changing disks into single-master mode
* wait until resync is done
* done
#

๐Ÿ“ฆ MOVE ๐Ÿ“ฆ

move [-f] [--ignore-consistency]
[-n node] [--compress=*compression-mode*] [--shutdown-timeout=*N*]
[--submit] [--print-jobid] [--ignore-ipolicy]
{instance-name}

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). Grab a snack bestie. ๐Ÿ“

The --compress option is used to specify which compression mode is used during the move. Valid values are 'none' (the default) and any values specified in the 'compression_tools' cluster parameter.

The --shutdown-timeout is used to specify how much time (in seconds) to wait before forcing the shutdown (e.g. xl destroy in XEN, killing the kvm process for KVM, etc.). By default two minutes are given to each instance to stop. โณ

--ignore-consistency makes Ganeti straight-up ignore any errors it hits while trying to shut the instance down on its node ๐Ÿ’… โ€” lowkey a lifesaver if the hypervisor is broken and you just want your data back, fr fr.

If you hand it --ignore-ipolicy, then any instance policy violations that pop up during this whole operation just get ignored. Not a vibe check it's willing to fail, apparently. ๐Ÿ™ˆ

Peep ganeti(7) for the rundown on --submit and all the other common options ๐Ÿซถ

Example, bestie:

# gnt-instance move -n node3.example.com instance1.example.com

CHANGE-GROUP ๐Ÿ”€

change-group [--submit] [--print-jobid]
[--iallocator name] [--to group...]  {instance-name}

This one moves an instance to another node group โœจ The move gets calculated by an iallocator โ€” either the one you pass on the command line or the cluster default, whichever. Heads up though: the iallocator only looks at disk information of the default disk template, even if the instances' disk templates are different from that. So like, don't come for it when it doesn't know about your other templates. ๐Ÿ’€

If you don't specify any destination groups with --to, then every group except the one your instance is already chilling in gets considered. It's giving "anywhere but here" energy.

See ganeti(7) for what --submit and the other common options do ๐ŸŒธ

Example:

# gnt-instance change-group -I hail --to rack2 inst1.example.com

Tags ๐Ÿท๏ธ

ADD-TAGS โž•

add-tags [--from file] {instance-name} {tag...}

Adds tags to the instance you named ๐ŸŽ€ If any of the tags has invalid characters in it, the entire operation aborts โ€” no partial sends, it's all or nothing, periodt.

If you pass the --from option, the tag list gets extended with the contents of that file, where each line becomes a tag ๐ŸŒˆ In that case you don't even need to pass tags on the command line โ€” but if you do, bestie, both sources get used. A file name of - gets read as stdin ๐Ÿ’–

LIST-TAGS ๐Ÿ“‹

list-tags {instance-name}

Lists the tags of the instance you named. Short, sweet, iconic ๐Ÿ‘‘

REMOVE-TAGS ๐Ÿ—‘๏ธ

remove-tags [--from file] {instance-name} {tag...}

Removes tags from the instance you named. If any of the tags don't already exist on the node, the whole operation aborts ๐Ÿ˜ญ โ€” again, all or nothing, she does not do half-measures.

If --from is given, the list of tags to remove gets extended with the contents of that file, where each line becomes a tag ๐Ÿฆ‹ In that case you don't need to pass tags on the command line โ€” but if you do, tags from both sources get removed. A file name of - gets read as stdin ๐ŸŒธ


REPORTING BUGS ๐Ÿ›

Found a bug? Report it to the project's issue tracker, or hit up the developers on the Ganeti mailing list ๐Ÿ“ฌ They wanna know, fr fr.


SEE ALSO ๐Ÿ‘€

Ganeti overview and specifications: ganeti(7) (general overview), ganeti-os-interface(7) (guest OS definitions), ganeti-extstorage-interface(7) (external storage providers) ๐Ÿ’œ

Ganeti commands: gnt-cluster(8) (cluster-wide commands), gnt-job(8) (job-related commands), gnt-node(8) (node-related commands), gnt-instance(8) (instance commands), gnt-os(8) (guest OS commands), gnt-storage(8) (storage commands), gnt-group(8) (node group commands), gnt-backup(8) (instance import/export commands), gnt-debug(8) (debug commands) โœจ

Ganeti daemons: ganeti-watcher(8) (automatic instance restarter), ganeti-cleaner(8) (job queue cleaner), ganeti-noded(8) (node daemon), ganeti-rapi(8) (remote API daemon) ๐ŸŒˆ

Ganeti htools: htools(1) (generic binary), hbal(1) (cluster balancer), hspace(1) (capacity calculation), hail(1) (IAllocator plugin), hscan(1) (data gatherer from remote clusters), hinfo(1) (cluster information printer), mon-collector(7) (data collectors interface) ๐Ÿ”ฅ


Copyright (C) 2006-2015 Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

and that's a wrap, bestie!! ๐ŸŽ€ this whole thing came to you from the Ganeti source, as the gnt-instance(8) manual page โ€” copyright stamped 2006-2015 ๐Ÿ’– go forth and instance, you absolute icon ๐Ÿ‘‘โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from