Configuring the Control Domain (LDOM)

Saturday, February 19, 2011 at 8:13 PM
Now it's time to configure the resources for your control domain! The first step is to make sure that the required SMF services are running:


# svcs -a | grep ldom
online Mar_20 svc:/ldoms/ldmd:default
online Mar_20 svc:/ldoms/vntsd:default


The ldmd service is responsible for controlling the platform and the vntsd service is responsible for providing the virtual terminal services for your logical domains. If they are not running, enable them. You should then be able to run the /opt/SUNWldm/bin/ldm command:


# /opt/SUNWldm/bin/ldm list
Name State Flags Cons VCPU Memory Util Uptime
primary active -t-cv SP 32 32G 0.8% 3d 16h 27m

As you can see, all 32 vcpu's and all of the memory are assigned to the primary (a.k.a. control) domain. We must free up these resources and create the basic infrastructure to support guest domains.


# /opt/SUNWldm/bin/ldm add-vdiskserver primary-vds0 primary
# /opt/SUNWldm/bin/ldm add-vconscon port-range=5000-5100 primary-vcc0 \
primary
# /opt/SUNWldm/bin/ldm add-vswitch net-dev=e1000g0 primary-vsw0 primary
# /opt/SUNWldm/bin/ldm add-vswitch net-dev=e1000g1 primary-vsw1 primary
# /opt/SUNWldm/bin/ldm add-vswitch net-dev=e1000g2 primary-vsw2 primary
# /opt/SUNWldm/bin/ldm add-vswitch net-dev=e1000g3 primary-vsw3 primary
# /opt/SUNWldm/bin/ldm set-mau 1 primary
# /opt/SUNWldm/bin/ldm set-vcpu 4 primary
# /opt/SUNWldm/bin/ldm set-memory 4G primary


The above creates the virtual disk server for servicing storage, the virtual terminal console ports, virtual switch for each physical network port, one crypto unit, 4 vcpu's, and 4GB's of memory for the primary domain. This sets up enough resources for the primary domain, which acts as a control and service domain for the platform. Now we need to store this configuration into the ALOM CMT and reboot.


# /opt/SUNWldm/bin/ldm list-config
factory-default [current]
# /opt/SUNWldm/bin/ldm add-config initial
# /opt/SUNWldm/bin/ldm list-config
factory-default [current]
initial [next]
# shutdown -y -g0 -i6


This stores the configuration and activates it. When the control domain comes back up, you'll notice that the available cpu and memory has changed:


# ldm list primary
Name State Flags Cons VCPU Memory Util Uptime
primary active -t-cv SP 4 4G 0.9% 3d 16h 39m
# psrinfo -vp
The physical processor has 4 virtual processors (0-3)
UltraSPARC-T1 (cpuid 0 clock 1000 MHz)
shou18leng01:~ $ psrinfo -v
Status of virtual processor 0 as of: 04/02/2007 11:00:03
on-line since 03/09/2007 23:53:23.
The sparcv9 processor operates at 1000 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 04/02/2007 11:00:03
on-line since 03/09/2007 23:53:27.
The sparcv9 processor operates at 1000 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 2 as of: 04/02/2007 11:00:03
on-line since 03/09/2007 23:53:27.
The sparcv9 processor operates at 1000 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 3 as of: 04/02/2007 11:00:03
on-line since 03/09/2007 23:53:27.
The sparcv9 processor operates at 1000 MHz,
and has a sparcv9 floating point processor.
# prtdiag -v | grep -i mem
Memory size: 4096 Megabytes
Now we are ready to create our first guest domain! Watch out for the next post.

0 comments

Post a Comment

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com