408
408
volumes, tear them down, attach and reattach, and so on. </para>
409
409
</simplesect></section>
411
<?dbhtml filename="live-migration-usage.html" ?>
412
<title>Using Live migration</title>
413
<para>Before starting live migration, check "Configuring Live Migration" sections.</para>
414
<para>Live migration provides a scheme to migrate running instances from a server to others.
415
No visible downtime, no transaction loss is ideal goal. This feature can be used as depicted
420
<para>First, make sure any instances running on a specific server</para>
421
<programlisting><![CDATA[
422
# euca-describe-instances
423
Reservation:r-2raqmabo
424
RESERVATION r-2raqmabo admin default
425
INSTANCE i-00000003 ami-ubuntu-lucid a.b.c.d e.f.g.h running testkey (admin, HostB) 0 m1.small 2011-02-15 07:28:32 nova
427
<para> In this example, i-00000003 is running on HostB.</para>
430
<para>Second, pick up other server where instances are migrated to.</para>
431
<programlisting><![CDATA[
432
# nova-manage service list
433
HostA nova-scheduler enabled :-) None
434
HostA nova-volume enabled :-) None
435
HostA nova-network enabled :-) None
436
HostB nova-compute enabled :-) None
437
HostC nova-compute enabled :-) None
439
<para> In this example, HostC can be picked up because nova-compute is running onto it.</para>
442
<para>Third, check HostC has enough resource for live migration.</para>
443
<programlisting><![CDATA[
444
# nova-manage service updateresource HostC
445
# nova-manage service describeresource HostC
446
HOST PROJECT cpu mem(mb) disk(gb)
447
HostC(total) 16 32232 878
448
HostC(used) 13 21284 442
453
<para>Remember that updateresource first, then describeresource. Otherwise, Host(used) is not updated.</para>
456
<para><emphasis role="bold">cpu:</emphasis>the nuber of cpu</para>
459
<para><emphasis role="bold">mem(mb):</emphasis>total amount of memory (MB)</para>
462
<para><emphasis role="bold">disk(gb)</emphasis>total amount of NOVA-INST-DIR/instances(GB)</para>
465
<para><emphasis role="bold">1st line shows </emphasis>total amount of resource physical server has.</para>
468
<para><emphasis role="bold">2nd line shows </emphasis>current used resource.</para>
471
<para><emphasis role="bold">3rd line and under</emphasis> is used resource per project.</para>
476
<para>Finally, live migration</para>
477
<programlisting><![CDATA[
478
# nova-manage vm live_migration i-00000003 HostC
479
Migration of i-00000001 initiated. Check its progress using euca-describe-instances.
481
<para> Make sure instances are migrated successfully with euca-describe-instances.
482
If instances are still running on HostB, check logfiles( src/dest nova-compute
483
and nova-scheduler)</para>
411
490
<?dbhtml filename="reference-for-flags-in-nova-conf.html" ?>
412
491
<title>Reference for Flags in nova.conf</title>
413
492
<para>For a complete list of all available flags for each OpenStack Compute service,