128 |
128 |
parameters for the instance. If no such parameters are specified, the
|
129 |
129 |
values are inherited from the cluster. Possible parameters are:
|
130 |
130 |
|
131 |
|
memory
|
132 |
|
the memory size of the instance; as usual, suffixes can be used to
|
133 |
|
denote the unit, otherwise the value is taken in mebibites
|
|
131 |
maxmem
|
|
132 |
the maximum memory size of the instance; as usual, suffixes can be
|
|
133 |
used to denote the unit, otherwise the value is taken in mebibites
|
|
134 |
|
|
135 |
minmem
|
|
136 |
the minimum memory size of the instance; as usual, suffixes can be
|
|
137 |
used to denote the unit, otherwise the value is taken in mebibites
|
134 |
138 |
|
135 |
139 |
vcpus
|
136 |
140 |
the number of VCPUs to assign to the instance (if this value makes
|
... | ... | |
140 |
144 |
whether the instance is considered in the N+1 cluster checks
|
141 |
145 |
(enough redundancy in the cluster to survive a node failure)
|
142 |
146 |
|
|
147 |
Note that before 2.6 Ganeti had a ``memory`` parameter, which was the
|
|
148 |
only value of memory an instance could have. With the
|
|
149 |
``maxmem``/``minmem`` change Ganeti guarantees that at least the minimum
|
|
150 |
memory is always available for an instance, but allows more memory to be
|
|
151 |
used (up to the maximum memory) should it be free.
|
143 |
152 |
|
144 |
153 |
The ``-H (--hypervisor-parameters)`` option specified the hypervisor
|
145 |
154 |
to use for the instance (must be one of the enabled hypervisors on the
|
... | ... | |
617 |
626 |
|
618 |
627 |
Example::
|
619 |
628 |
|
620 |
|
# gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
|
|
629 |
# gnt-instance add -t file --disk 0:size=30g -B maxmem=512 -o debian-etch \
|
621 |
630 |
-n node1.example.com --file-storage-dir=mysubdir instance1.example.com
|
622 |
|
# gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
|
623 |
|
-n node1.example.com instance1.example.com
|
|
631 |
# gnt-instance add -t plain --disk 0:size=30g -B maxmem=1024,minmem=512 \
|
|
632 |
-o debian-etch -n node1.example.com instance1.example.com
|
624 |
633 |
# gnt-instance add -t plain --disk 0:size=30g --disk 1:size=100g,vg=san \
|
625 |
|
-B memory=512 -o debian-etch -n node1.example.com instance1.example.com
|
626 |
|
# gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
|
|
634 |
-B maxmem=512 -o debian-etch -n node1.example.com instance1.example.com
|
|
635 |
# gnt-instance add -t drbd --disk 0:size=30g -B maxmem=512 -o debian-etch \
|
627 |
636 |
-n node1.example.com:node2.example.com instance2.example.com
|
628 |
637 |
|
629 |
638 |
|
... | ... | |
708 |
717 |
"iallocator": "dumb",
|
709 |
718 |
"hypervisor": "xen-hvm",
|
710 |
719 |
"hvparams": {"acpi": true},
|
711 |
|
"backend": {"memory": 512}
|
|
720 |
"backend": {"maxmem": 512, "minmem": 256}
|
712 |
721 |
}
|
713 |
722 |
}
|
714 |
723 |
|
... | ... | |
1033 |
1042 |
forth, e.g.::
|
1034 |
1043 |
|
1035 |
1044 |
# gnt-instance start -H kernel_args="single" instance1
|
1036 |
|
# gnt-instance start -B memory=2048 instance2
|
|
1045 |
# gnt-instance start -B maxmem=2048 instance2
|
1037 |
1046 |
|
1038 |
1047 |
|
1039 |
1048 |
The first form will start the instance instance1 in single-user mode,
|