LDOM Creation

OK, so we need an LDOM fast, you you don’t remember the steps. Here is a step by step install, from making the Solaris11 server ready to host LDOMs, to creating your first Solaris 10 LDOM.

First, we need to prepare the server to host LDOMs. This means setting up the console service, LDOM service, and migrating the initial install to being a Control Domain (CDOM). This will enable the virtual switch “switch-primary” and the virtual storage controller ”primary-vds”. We also will set the console ports, starting at port 5000 through port 5100.

root@ejb01 # ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-c– UART 512 261632M 0.3% 2d 13h 58m

root@ ejb01 # ldm add-vconscon port-range=5000-5100 primary-console primary
root@ ejb01 # svcadm enable vntsd
root@ ejb01 # svcs vntsd
STATE STIME FMRI
online 9:53:21 svc:/ldoms/vntsd:default

root@ ejb01 # ldm set-vcpu 8 primary
root@ ejb01 # ldm set-mau 1 primary
root@ ejb01 # ldm start-reconf primary
root@ ejb01 # ldm set-memory 7680m primary
root@ ejb01 # ldm add-config initial
root@ ejb01 # shutdown -y -g0 -i6
root@ejb01:~# ldm add-vswitch net-dev=aggr0 switch-primary primary
root@ejb01:~# ldm add-vds primary-vds primary
root@ejb01:~# ldm list-services
VCC
NAME LDOM PORT-RANGE
primary-console primary 5000-5100

VSW
NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK
switch-primary primary 00:14:32:e2:12:ab aggr0 0 switch@0 1 1 1500 on

VDS
NAME LDOM VOLUME OPTIONS MPGROUP DEVICE
primary-vds primary

After this is completed, you should now see the primary LDOM, this is where you manage future LDOMs from. Use the ldm command to list LDOMs.

 

root@ejb01:/home/erik# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
primary active -n-cv- UART 8 7680M 0.3% 0.3% 01d 12h 23m

Next we will create a LDOM named bubba, with 8G of memory and 8 virtual CPUs. We will also create a 30G zfs volume to act as the boot disk.

root@ejb01:/home/erik# ldm create bubba
root@ejb01:/home/erik# ldm set-memory 8g bubba
root@ejb01:/home/erik# ldm set-vcpu 8 bubba
root@ejb01:/home/erik# zfs create -V 30g data/bubba.bootdisk
root@ejb01:/home/erik# ldm add-vdsdev /dev/zvol/dsk/data/bubba.bootdisk@primary-vds
root@ejb01:/home/erik# ldm add-vnet net0 switch-primary bubba root@ejb01:/home/erik# ldm set-variable auto-boot\?=false bubba
root@ejb01:/home/erik# ldm add-vdisk bubba.bootdisk@primary-vds bubba
root@ejb01:/home/erik# ldm bind bubba

You should now see the new LDOM, using the ldm list command .

root@ejb01:/home/erik# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
primary active -n-cv- UART 8 7680M 0.3% 0.3% 40d 23h 35m
bubba bound —— 5000 8 8G

You now can start the LDOM, and install Solaris manually.

root@ejb01:/home/erik# ldm start bubba
LDom bubba started

We can now see the LDom running

root@ejb01:/home/erik# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
primary active -n-cv- UART 8 7680M 0.3% 0.3% 40d 23h 35m
bubba active -t—- 5000 8 8G 2.4% 0.8% 0s

To connect to the console, you shout telnet to the console port identified in the ldm list command. In this example the LDOM is using port 5000.

root@ejb01:/home/erik# telnet localhost 5000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “bubba” in group “bubba” ….
Press ~? for control options ..

{0} ok

Now we need to install an OS. First we need to  present an ISO into the VDS so VMs can use the ISO. The VM needs to be down to do this;

root@ejb01:/home/erik# ldm stop bubba

Remote graceful shutdown or reboot capability is not available on bubba
LDom bubba stopped

Next, we mount the iso image into the LDOM, and boot the LDOM

root@ejb01:/home/erik# ldm add-vdsdev /home/erik/sol-10-u11-ga-sparc-dvd.iso sol10_install_iso@primary-vds

root@ejb01:/home/erik# ldm add-vdisk sol10_install_iso sol10_install_iso@primary-vds bubba
root@ejb01:/home/erik# ldm start bubba
root@ejb01:/home/erik# telnet localhost 5000
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “bubba” in group “bubba” ….
Press ~? for control options ..

Next we will verify that we can see the ISO, and will boot from the ISO.

{0} ok devalias

sol10_install_iso /virtual-devices@100/channel-devices@200/disk@0
net0 /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 sol10_install_iso
Boot device: /virtual-devices@100/channel-devices@200/disk@0 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.
WARNING: Attempt to access service ‘md-update’ from domain ‘unknown’
WARNING: ds@0: <data: invalid handle 0x200000001
Configuring devices.
Using RPC Bootparams for network configuration information.

 

From this point, this should run like a normal Solaris 10 installation.

 

 

2 Replies to “LDOM Creation”

  1. Hi there,
    I did exactly what you described. But after all, the keys F2 or F6 are not working in the terminal session. And when I press ESC I can use ESC-2 and ESC-6. But the curser keys are not working. How do I install the Solaris 11.2?

    Thanks for any tipps.

    — Carsten

Leave a Reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.