Creating an LDOM step-by-step
This article will provide a clear idea about LDOM creation and also the Solaris Operating Environment installation on ithe newly created Logical Domain.
In my previous post Solaris LDOM Overview I provided a brief concept on LDOMs. Whereas, this article acts like a demo showing step-by-step the creation of an LDOM.
For ease of use, in this article my LDOM is named ldm-sol10 and my Control Domain is named primary.
Creating a new LDOM
- List current LDOMs
root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 3h
In the above output, we clearly see that I only have one primary domain, this is my control domain. - Add a new LDOM
root@t2-svr# ldm add-domain ldm-sol10 root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 5h ldm-sol10 inactive ------
- Add 8 Vrtual CPUs and 8GB of memory to the domain:
root@t2-svr# ldm add-vcpu 8 ldm-sol10 root@t2-svr# ldm add-memory 8g ldm-sol10
- Again, list the LDOM to confirm resources are assigned to the new LDOM:
root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 5h ldm-sol10 inactive ------ 8 8G
- Add a virtual network interface to the LDOM:
root@t2-svr# ldm add-vnet vnet1 vsw=primary-vsw0 ldm-sol10
- Add a device to the virtual disk server which will be exported as a virtual disk to the LDOM:
root@t2-svr# ldm add-vdiskserverdevice /dev/dsk/c1t3d0s3 vol3@primary-vds0
Now add the virtual disk to the LDOMroot@t2-svr# ldm add-vdisk vdisk2 vol3@primary-vds0 ldm-sol10
- List domain resources assigned to our new LDOM:
root@t2-svr# ldm list-bindings ldm-sol10 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldm-sol10 inactive -t---- 8 8G UUID 1a2b3c4d-5e6f-0a1b-2c3d-4e5f0a1b2c3d MAC 00:14:1a:2b:3c:4d HOSTID 0x1a2b3c4d CONTROL failure-policy=ignore extended-mapin-space=off DEPENDENCY master= CORE CID CPUSET 1 (4, 5, 6, 7) 2 (8, 9, 10, 11) VCPU VID PID CID UTIL STRAND 0 4 1 100% 100% 1 5 1 0.0% 100% 2 6 1 0.0% 100% 3 7 1 0.0% 100% 4 8 2 0.0% 100% 5 9 2 0.0% 100% 6 10 2 0.0% 100% 7 11 2 0.0% 100% MEMORY RA PA SIZE 0x8000000 0x5c8000000 8G NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vsw0@primary 0 network@0 00:14:1a:2b:3c:9b 1 1500 PEER MAC MODE PVID VID MTU LINKPROP primary-vsw0@primary 00:1a:2b:3c:4d:a6 1 1500 vnet1@primary 00:1a:2b:3c:cd:ac 1 1500 DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk2 vol3@primary-vds0 0 disk@0 primary VCONS NAME SERVICE PORT ldm-sol10 primary-vcc0@primary
- Now bind our new LDOM:
root@t2-svr# ldm bind-domain ldm-sol10 root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 5h ldm-sol10 bound ------ 8 8G
- Start our new LDOM
root@t2-svr# ldm start-domain ldm-sol10 LDom ldm-sol10 started root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 3h ldm-sol10 active -t---- 5000 8 8G 12% 5m
- Add an additional device in the VDS:
root@t2-svr# ldm add-vdiskserverdevice /dev/dsk/c1t3d0s6 vol4@primary-vds0 root@t2-svr# ldm list-services VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK primary-vsw0 primary 00:1a:2b:3c:4d:a6 net0 0 switch@0 1 1 1500 on VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary iso /dev/lofi/1 disk01 /dev/dsk/c1t3d0s5 vol1 /dev/dsk/c1t3d0s0 vol2 /dev/dsk/c1t3d0s1 dvd_vol ro /dev/dsk/c2t0d0s2 vol3 /dev/dsk/c1t3d0s3 vol4 /dev/dsk/c1t3d0s6
- Locate my Solaris 10 ISO image and add this as a resource on my Control Domain:
root@t2-svr# cd /export/iso/s10 root@t2-svr# ls -lh -rw-r--r-- 1 root root 2.2G Mar 27 2013 sol-10-u11-ga-sparc-dvd.iso root@t2-svr# ldm add-vdiskserverdevice /export/iso/s10/sol-10-u11-ga-sparc-dvd.iso sol10@primary-vds0
- Add the ISO resource to the new LDOM:
root@t2-svr# ldm add-vdisk sol10iso sol10@primary-vds0 ldm-sol10 Please perform the operation while the LDom is bound or inactive
From the above we see that we can only bind resources to an LDOM when it is in an bound/inactive state. So we will need to stop the new LDOM and add the ISO resouces and restart the LDOM:root@t2-svr# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 12 23G 0.1% 117d 5h ldm-sol10 active -t---- 5000 8 8G 12% 2s root@t2-svr# ldm stop-domain ldm-sol10 LDom ldm-sol10 stopped root@t2-svr# ldm add-vdisk sol10iso sol10@primary-vds0 ldm-sol10 root@t2-svr# ldm start-domain ldm-sol10 LDom ldm-sol10 started
- Now lets connect to our new LDOM:
root@t2-svr# telnet 0 5000 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connecting to console "ldm-sol10" in group "ldm-sol10" .... Press ~? for control options .. {0} ok
- Lets determine the device associated with the ISO image, and boot from it to start the installation of the Solaris OS:
{0} ok devalias sol10iso /virtual-devices@100/channel-devices@200/disk@1 vdisk2 /virtual-devices@100/channel-devices@200/disk@0 vnet0 /virtual-devices@100/channel-devices@200/network@0 net /virtual-devices@100/channel-devices@200/network@0 disk /virtual-devices@100/channel-devices@200/disk@0 virtual-console /virtual-devices/console@1 name aliases {0} ok boot sol10iso Sun Fire T200, No Keyboard Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.30.4.d, 8192 MB memory available, Serial #87654321. Ethernet address 00:14:1a:2b:3c:4d, Host ID: 1a2b3c4d. Boot device: /virtual-devices@100/channel-devices@200/disk@1 File and args: SunOS Release 5.10 Version Generic_147147-26 64-bit Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Configuring devices. Using RPC Bootparams for network configuration information. Attempting to configure interface vnet0... Skipped interface vnet0 Setting up Java. Please wait... Serial console, reverting to text install Beginning system identification... Searching for configuration file(s)... Search complete. Discovering additional network configuration...
From here we can proceed with the normal Solaris OS installation. Once completed the LDOM is ACTIVE and ready to act as a server.
Be the first to comment.
Leave a response