Site icon UnixArena

How to perform Live domain migration on LDOM ? Oracle VM SPARC

In Oracle VM for SPARC,we can migrate the guest domains to another system without any downtime. This is similar to vmotion on VMware ESXi. This feature provides the operational flexibility to the customers who don’t want the system to be down for system maintenance.Prior to the system maintenance ,we can easily move the guest domains to another system without any downtime using this live migration.Once you have completed the system maintenance , you can just migrate the guest domains back  to the original systems.

Oracle VM for SPARC Tutorial:
[checklist]

[/checklist]

Normally we would allocate the same set of LUNS to source and target machines. The live-migration feature is just only for the Guest domain migration not for the storage.So when the control domains verify the remote system, it will check whether the guest machine storage is accessible or not.

Prerequisites:

[checklist]

[/checklist]
How the migration is happening without any downtime ?

[starlist]

[/starlist]
Here we will see how we can perform the live migration between two T5140 systems.
1. Login to the source system and list the guest domains.

-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      12    4128M    0.5%  1d 15h 45m
ua1guest         active     -n----  5000    12    6G       0.1%  1h 35m
-bash-3.2#

2.List the guest domain “ua1guest” bindings.Make sure the remote system should has enough enough resource to handle this guest domains. (Use # ldm list-devices -a)

-bash-3.2# ldm ls-bindings ua1guest
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
ua1guest         active     -n----  5000    12    6G       0.1%  1h 36m

UUID
    7b74fd6b-88ea-c578-d0df-efe202fb8c12

MAC
    00:14:4f:f9:87:e7

HOSTID
    0x84f987e7

CONTROL
    failure-policy=ignore

DEPENDENCY
    master=

CORE
    CID    CPUSET
    1      (8, 9, 10, 11, 12, 13, 14, 15)
    3      (24, 25, 26, 27, 28, 29, 30, 31)

VCPU
    VID    PID    CID    UTIL STRAND
    0      8      1      0.2%   100%
    1      9      1      0.1%   100%
    2      10     1      0.1%   100%
    3      11     1      0.0%   100%
    4      12     1      0.0%   100%
    5      13     1      0.3%   100%
    6      14     1      0.0%   100%
    7      15     1      0.0%   100%
    8      24     3      0.0%   100%
    9      25     3      0.0%   100%
    10     26     3      0.0%   100%
    11     27     3      0.1%   100%

MEMORY
    RA               PA               SIZE
    0x10000000       0x10000000       4G
    0x400000000      0x110000000      2G

VARIABLES
    auto-boot?=false
    keyboard-layout=US-English

NETWORK
    NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   LINKPROP
    vnet0            primary-vsw0@primary        0    network@0  00:14:4f:fa:b2:d6        1                         1500
        PEER                        MAC               MODE   PVID VID                  MTU   LINKPROP
        primary-vsw0@primary        00:14:4f:fa:12:0e        1                         1500

DISK
    NAME             VOLUME                      TOUT ID   DEVICE  SERVER         MPGROUP
    ua1guestdsk      ua1guest@primary-vds0            0    disk@0  primary

VCONS
    NAME             SERVICE                     PORT
    ua1guest         primary-vc0@primary         5000

-bash-3.2#

3.List the source system’s services. You should also have the same services name configured on the target system.

-bash-3.2# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vc0      primary          5000-5100

VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
    primary-vsw0     primary          00:14:4f:fa:12:0e nxge1     0    switch@0              1               1                         1500  

VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
    primary-vds0     primary          ua1guest                                       /dev/rdsk/c4t600144F0C1135B490000530383E50007d0s2
                                      GSTISO         ro                              /export/home/sol-10-u10-ga2-sparc-dvd.iso

-bash-3.2#

4.Now login to target system and check whether the live migration can be done or not.

-bash-3.2# ldm list-services
VCC
    NAME             LDOM             PORT-RANGE
    primary-vc0      primary          5000-5100

VSW
    NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
    primary-vsw0     primary          00:14:4f:fb:a5:6d nxge1     0    switch@0              1               1                         1500  

VDS
    NAME             LDOM             VOLUME         OPTIONS          MPGROUP        DEVICE
    primary-vds0     primary          ua1guest                                       /dev/rdsk/c4t600144F0C1135B490000530383E50007d0s2

-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     8G       0.2%  1d 6h 23m
subuldom         inactive   ------          4     4G
-bash-3.2#

As per the above command output, all the services names are matching with source system. We also have the enough resource to handle the guest domain.

5. Login to the source system’s control domain and execute the migration command.It will prompt for target system root password. Just enter continue.

-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      12    4128M    0.3%  1d 15h 53m
ua1guest         active     -n----  5000    12    6G       0.0%  1h 42m
-bash-3.2# ldm migrate ua1guest 192.168.2.29
Target Password:

6.Login to the target system’s control domain and list the domains.

-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     8G       0.2%  1d 6h 23m
subuldom         inactive   ------          4     4G
-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     8G        14%  1d 6h 26m
ua1guest         bound      -----t  5000    1     6G
subuldom         inactive   ------          4     4G
-bash-3.2#

In the above output, you can see , “ua1guest domain is copying from the source system.

7.In the source system , you may get a warning like the below one after successfully completion of live-migration.

Domain ua1guest is not running an operating system that is
compatible with the latest migration functionality.

Upgrading to the latest software will remove restrictions on
a migrated domain that are in effect until it is rebooted.
Consult the product documentation for a full description of
these restrictions.
-bash-3.2#

8.In target system, the guest domain flag will be changed from “t” to “n” .

-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     8G        44%  1d 6h 28m
ua1guest         bound      -----t  5000    1     6G
subuldom         inactive   ------          4     4G
-bash-3.2# ldm ls-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     8G       0.9%  1d 6h 32m
ua1guest         active     -n----  5000    12    6G       0.1%  12h 11m
subuldom         inactive   ------          4     4G
-bash-3.2#

9.You didn’t believe the live migration ? Let me double check.

-bash-3.2# telnet localhost 5000
Trying ::1...
telnet: connect to address ::1: Network is unreachable
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connecting to console "ua1guest" in group "ua1guest" ....
Press ~? for control options ..

UAMIGD console login: root
Password:
Last login: Thu Feb 20 00:50:39 on console
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
# uptime
  2:02am  up  1:43,  1 user,  load average: 0.00, 0.02, 0.01
#

As per the above command output, nothing has happened to the guest domain. The system is up from last 2hr. The migration has been initiated few minutes back.So the guest domain was up during the migration time too.

Hope you will also give a try on LDOM  guest live migration . Thank you for visiting UnixArena.

Exit mobile version