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.
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.
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
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
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
List the default services created solfoo23# ldm list-services primary
NAME VOLUME OPTIONS DEVICE
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-vcpu 2 primary
solfoo23# ldm set-memory 1024M primary
Now, set these modified configuration permanent using list-spconfig option.
solfoo23# ldm add-spconfig initial
solfoo23# ldm list-spconfig
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.
Plumb the virtual switch(vsw0)
solfoo23# ifconfig vsw0 plumb
Bring down the primary interface
solfoo23# ifconfig e1000g1 down unplumb
Configure Virtual switch with the primary interface details
solfoo23# ifconfig vsw0 <ip> netmask <netmask> broadcast + up
Modify the hostname file to make this configuration permanent
solfoo23# mv /etc/hostname.e1000g1 /etc/hostname.vsw0
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-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”
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.
Connected to localhost….
Escape character is ’^]’.
Connecting to console “domfoo” in group “domfoo” ….
Press ~? for control options ..
Your LDom is up!. You can install it using jumpstart. Your LDoms environment is ready!
Refer Solaris LDOM virtualization document links for more information :
LDOMs Beginners guide : http://www.sun.com/blueprints/0207/820-0832.pdf
LDOMs presentation : http://www.snpnet.com/customer_pub/sun/isv_LDOM/
Admin guide : http://docs-pdf.sun.com/819-6428-11/819-6428-11.pdf