Monday, 24 February 2014

Earlier post we discussed about Installation of LDM, Configuration method of Control Domain and Service Domain. In this post we are going to discussing about the configuration methods of Logical Domain (LDOM), It's also called as Guest Domain. Let we can start do the configuration of Logical Domain.

List of Topics :

Adding/Deleting Logical Domain
High Level Plan
  • Add the Logical Domain
  • Add Resources to the Logical Domain (CPUs, Memory)
  • Add virtual Devices ( Virtual Network, Virtual Disks).
  • Set "auto-boot" variable 
  • Bind the resources to the Logical Domain.
  • Start the Logical Domain
  • Connect to the Console of Logical Domain.
In below example we are going to create Logical domain with 8 cores, 2 GB, 1 No: Vnet & Vdisks.
Creating the Logical Domain and assigning Vcpu and Memory
[root@unixrock /]# ldm add-domain testldom01
[root@unixrock /]#
[root@unixrock /]# ldm add-vcpu 8 testldom01
[root@unixrock /]#
[root@unixrock /]# ldm add-memory 2G testldom01
[root@unixrock /]#
Checking the status of Logical Domain
[root@unixrock /]# ldm list-bindings testldom01
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
testldom01       inactive   ------           8     2G             

UUID
    63593afc-e45e-eec5-ace6-b84d0c743b16

CONTROL
    failure-policy=ignore

DEPENDENCY
    master= 

[root@unixrock /]#
Adding Virtual Network device to the logical Domain.
[root@unixrock /]# ldm add-vnet vnet0 primary-vsw0 testldom01
[root@unixrock /]#
[root@unixrock /]# ldm list-bindings testldom01
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
testldom01       inactive   ------          8     2G             

UUID
    63593afc-e45e-eec5-ace6-b84d0c743b16

CONTROL
    failure-policy=ignore

DEPENDENCY
    master= 

NETWORK
    NAME    SERVICE      ID   DEVICE   MAC         MODE   PVID VID   MTU   LINKPROP  
    vnet0 primary-vsw0    0      00:14:4f:f8:f3:f4   1                                         

[root@unixrock /]#
Adding Virtual disk to the Logical Domain, before that we have to assign the disk to the Service Domain which provide the service to our Logical Domain. In the below example, we are adding the "/dev/dsk/c0t1d0s2" disk to service primary-vds0, then adding a vdisk01 from primary-vds0 to our Logical Domain
[root@unixrock /]# ldm add-vdsdev /dev/dsk/c0t1d0s2 vol01@primary-vds0 
[root@unixrock /]#
[root@unixrock /]# ldm add-vdisk vdisk01 vol01@primary-vds01 testldom01
[root@unixrock /]# 
[root@unixrock /]# ldm list-services primary
VCC
    NAME             LDOM             PORT-RANGE
    primary-vconsole 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:f8:f3:f4 e1000g0   0   switch@0         1    1    1500

VDS
    NAME             LDOM     VOLUME  OPTIONS   MPGROUP        DEVICE
    primary-vds0   primary    vol01                     /dev/dsk/c0t1d0s2

[root@unixrock /]#
[root@unixrock /]# ldm list-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.1%  13m
testldom01       inactive   ------          8     2G             
[root@unixrock /]#
Setting "auto-boot" variable as "false" which leave the server in OK prompt and start the Logical Domain
[root@unixrock /]# ldm set-variable auto-boot\?=false testldom1
[root@unixrock /]# ldm bind-domain testldom01
[root@unixrock /]#
[root@unixrock /]# ldm list-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.4%  20m
testldom01       bound      -t----  5001    8     2G          
[root@unixrock /]# 
[root@unixrock /]# ldm start-domain testldom01
LDom testldom01 started
[root@unixrock /]#
[root@unixrock /]# ldm list-domain
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      8     2G       0.4%  25m
testldom01       active     -t----  5001    8     2G       0.1%   5m  
[root@unixrock /]# 
Connecting to the Logical Domain, we can use either IP's of Control domain or localhost.
[root@unixrock /]# telnet localhost 5001 
Trying ::1...
telnet: connect to address ::1: Network is unreachable
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

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

{0} ok
{0} ok 
To coming out of the logical domain console, use "Ctrl + ]" and telnet > quit

Perfect !!!! We have successfully configured our Logical Domain, although we have to boot the Logical Domain from bootable DVD or ISO image, In Order to start our OS installation.  Please refer to my next Post that will show you to allocate the ISO image to the Logical Domain.

Thanks for reading this post, If this post helps, Please leave your valuable comments and like the page.