Revision d4fcd298 doc/admin.rst

b/doc/admin.rst
246 246
The above command has the minimum required options; other options you
247 247
can give include, among others:
248 248

  
249
- The memory size (``-B memory``)
249
- The maximum/minimum memory size (``-B maxmem``, ``-B minmem``)
250
  (``-B memory`` can be used to specify only one size)
250 251

  
251 252
- The number of virtual CPUs (``-B vcpus``)
252 253

  
......
279 280

  
280 281
  gnt-instance remove INSTANCE_NAME
281 282

  
283
.. _instance-startup-label:
284

  
282 285
Startup/shutdown
283 286
~~~~~~~~~~~~~~~~
284 287

  
......
287 290

  
288 291
  gnt-instance startup INSTANCE_NAME
289 292

  
293
Ganeti will start an instance with up to its maximum instance memory. If
294
not enough memory is available Ganeti will use all the available memory
295
down to the instance minumum memory. If not even that amount of memory
296
is free Ganeti will refuse to start the instance.
297

  
290 298
Note, that this will not work when an instance is in a permanently
291 299
stopped state ``offline``. In this case, you will first have to
292 300
put it back to online mode by running::
......
301 309
does not require dynamically allocated resources (memory and vcpus),
302 310
after shutting down an instance, execute the following::
303 311

  
304
  gnt-instance modify --ofline INSTANCE_NAME
312
  gnt-instance modify --offline INSTANCE_NAME
305 313

  
306 314
.. warning:: Do not use the Xen or KVM commands directly to stop
307 315
   instances. If you run for example ``xm shutdown`` or ``xm destroy``
......
334 342
status), etc. This is harder to parse and is more expensive than the
335 343
list operation, but returns much more detailed information.
336 344

  
345
Changing an instance's runtime memory
346
+++++++++++++++++++++++++++++++++++++
347

  
348
Ganeti will always make sure an instance has a value between its maximum
349
and its minimum memory available as runtime memory. As of version 2.6
350
Ganeti will only choose a size different than the maximum size when
351
starting up, failing over, or migrating an instance on a node with less
352
than the maximum memory available. It won't resize other instances in
353
order to free up space for an instance.
354

  
355
If you find that you need more memory on a node any instance can be
356
manually resized without downtime, with the command::
357

  
358
  gnt-instance modify -m SIZE INSTANCE_NAME
359

  
360
The same command can also be used to increase the memory available on an
361
instance, provided that enough free memory is available on its node, and
362
the specified size is not larger than the maximum memory size the
363
instance had when it was first booted (an instance will be unable to see
364
new memory above the maximum that was specified to the hypervisor at its
365
boot time, if it needs to grow further a reboot becomes necessary).
337 366

  
338 367
Export/Import
339 368
+++++++++++++
......
476 505
That's it. After the command completes the secondary node is now the
477 506
primary, and vice-versa.
478 507

  
508
The instance will be started with an amount of memory between its
509
``maxmem`` and its ``minmem`` value, depending on the free memory on its
510
target node, or the operation will fail if that's not possible. See
511
:ref:`instance-startup-label` for details.
512

  
479 513
Live migrating an instance
480 514
~~~~~~~~~~~~~~~~~~~~~~~~~~
481 515

  
......
489 523
long the migration will take. In any case, for both KVM and Xen
490 524
hypervisors, the migration will be transparent to the instance.
491 525

  
526
If the destination node has less memory than the instance's current
527
runtime memory, but at least the instance's minimum memory available
528
Ganeti will automatically reduce the instance runtime memory before
529
migrating it, unless the ``--no-runtime-changes`` option is passed, in
530
which case the target node should have at least the instance's current
531
runtime memory free.
532

  
492 533
Moving an instance (offline)
493 534
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
494 535

  

Also available in: Unified diff