Sun Logical Domains or LDoms is a full virtual machine that runs an independent operating system instance and contains virtualized CPU, memory, storage, console, and cryptographic devices. This technology allows you to allocate a system resources into logical groupings and create multiple, discrete systems, each with their own operating system, resources, and identity within a single computer system. We can run a variety of applications software in different logical domains and keep them independent of performance and security purposes. The LDoms environment can help to achieve greater resource usage, better scaling, and increased security and isolation.

 


Logical & Control domain :
The control domain communicates with the hypervisor to create and manage all logical domain configurations within a server platform. The Logical Domains Manager is used to create and manage logical domains. The Logical Domains Manager maps logical domains to physical resources. Without access to the Logical Domains Manager all logical domain resource levels remain static. The initial domain created when installing Logical Domains software is a control domain and is named primary.

Image from : http://www.sun.com/blueprints/0207/820-0832.pdf

You can download Logical Domain manager from http://sun.com/ldoms . Please read the release notes for system firmware requirements and patch requirements. By default, Ldoms software gets installed to /opt/SUNWldm/. Make sure the below commands works – and that confirms Logical domain manager is running.

solfoo23# /opt/SUNWldm/bin/ldm list
Name State Flags Cons VCPU Memory Util Uptime
primary active -t-cv SP 32 16128M 49% 90mm

Creating default services : You need to create the default virtual services that the control domain uses to provide disk services, console access and networking. The below commands explains them.

  1. Create Virtual Disk server(vds) : Virtual disk server helps importing virtual disks into a logical domain from the control domain.

    solfoo23# ldm add-vds primary-vds0 primary

  2. Create Virtual Console concentrator Server(vcc) : Virtual Console concentrator server provides terminal service to logical domain consoles.

    solfoo23# ldm add-vcc port-range=5000-5100 primary-vcc0 primary

  3. Create Virtual Switch server(vsw) : Virtual Switch server enables networking between virtual network devices in logical domains.

    solfoo23# ldm add-vsw net-dev=e1000g0 primary-vsw0 primary

  4. List the default services created

    solfoo23# ldm list-services primary
    VDS
    NAME VOLUME OPTIONS DEVICE
    primary-vds0

    VCC
    NAME PORT-RANGE
    primary-vcc0 5000-5100

    VSW
    NAME MAC NET-DEV DEVICE MODE
    primary-vsw0 00:11:5a:12:dc:fc e1000g1 switch@0 prog,promisc

Control Domain Creation : The next step is to perform the initial setup of the primary domain, which will act as the control domain. You should specify the resources that the primary domain will use and what will be released for use by other guest domains. In this document, we are creating the control domain with 2 cpu’s and 1gb RAM.     

solfoo23# ldm set-mau 0 primary
solfoo23# ldm set-vcpu 2 primary
solfoo23# ldm set-memory 1024M primary

Now, set these modified configuration permanent using list-spconfig option.    

solfoo23# ldm list-spconfig
factory-default [current]    

solfoo23# ldm add-spconfig initial    

solfoo23# ldm list-spconfig
factory-default [current]
initial [next]

Reboot the server and it will come up with initial configuration.

Networking between domains : Networking between control, service and other domains is disabled by default. To enable this, the virtual switch device should be configured as a network device. On the server console and perform the following network configuration steps.

  1. Plumb the virtual switch(vsw0)

    solfoo23# ifconfig vsw0 plumb

  2. Bring down the primary interface

    solfoo23# ifconfig e1000g1 down unplumb

  3. Configure Virtual switch with the primary interface details

    solfoo23# ifconfig vsw0 <ip> netmask <netmask> broadcast + up

  4. Modify the hostname file to make this configuration permanent

    solfoo23# mv /etc/hostname.e1000g1 /etc/hostname.vsw0

  5. Enable Virtual Network terminal server daemon

    solfoo23# svcadm enable vntsd

Now the setup is done. Run “ldm list-bindings primary” and make sure they are ok.

Logical Domain Creation : Now that the system is ready, prepare and plan for the logical domain configuration. In this document, we are creating a logical domain with 2 CPUs and 1GB memory and “domfoo” is the name.

solfoo23# ldm add-domain domfoo
solfoo23# ldm add-vcpu 2 domfoo
solfoo23# ldm add-memory 1G domfoo
solfoo23# ldm add-vnet vnet1 primary-vsw0 domfoo
solfoo23# ldm add-vdsdev /dev/dsk/c1t2d0s2 vol1@primary-vds0
solfoo23# ldm add-vdisk vdisk1 vol1@primary-vds0 domfoo
solfoo23# ldm bind domfoo
solfoo23# ldm set-var auto-boot?=false domfoo
solfoo23# ldm start-domain domfoo

You will be able see the domain using “ldm list-domain”

solfoo23# ldm list-domain
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv SP 2 2G 0.2% 3h 4m
domfoo inactive —– 2 1G

Connect to the logical domain console by telneting to the virtual console port.

solfoo23# telnet localhost 5000
Trying 127.0.0.1…
Connected to localhost….
Escape character is ’^]’.
Connecting to console “domfoo” in group “domfoo” ….
Press ~? for control options ..
{0} ok

Your LDom is up!. You can install it using jumpstart. Your LDoms environment is ready!

Refer Solaris LDOM virtualization document links for more information :

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
Read More

What is /proc/slabinfo?

/proc/slabinfo gives information about memory usage on the slab level. Linux kernels uses slab pools to manage memory…
Read More

Netapp deduplication

Netapp deduplication – is a new technology to control the rate of data growth. The average UNIX or…